mdx-editor / editor

A rich text editor React component for markdown
https://mdxeditor.dev
MIT License
1.63k stars 131 forks source link

[BUG] Unable to access error object #461

Closed fredachang closed 2 months ago

fredachang commented 2 months ago

Hi Petyo,

Hoep you've been well. I want to get access to the onError object as per the documentation so I can pass a custom call back to handle the error. However, I cannot seem to access the call back at all, even with just a simple console.log in the call back. Your help would be appreciated.

Cheers

Describe the bug Cannot get access to the error payload object with the onError call back.

Reproduction https://codesandbox.io/p/sandbox/mdx-editor-catch-all-plugin-forked-qg8fdl?file=%2Fsrc%2FApp.tsx%3A14%2C11

To Reproduce Steps to reproduce the behavior:

  1. Introduce a thematic break error (where the plug in is not added to the mdx editor)
  2. pass a console.log call back to onError
  3. Check console -> no errors shown

Expected behavior console.log of the error object

Additional context Using next.js

github-actions[bot] commented 2 months ago

:tada: This issue has been resolved in version 3.3.4 :tada:

The release is available on:

Your semantic-release bot :package::rocket: