You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The text was updated successfully, but these errors were encountered:
ansorensen
changed the title
Could we expose an optional callback handler here instead of swallowing errors?
Could we expose an optional callback handler to be called here instead of only oging errors?
Dec 14, 2019
ansorensen
changed the title
Could we expose an optional callback handler to be called here instead of only oging errors?
Could we expose an optional callback handler to be called here instead of only logging errors?
Dec 14, 2019
We could provide support for onError attribute but it will be called only if an error occurs during the editor's initialization. If the onError attribute won't be defined, console.log( error ) could be called instead (as a default value).
It's a start! (I can do a pull request this week for this issue). Reading through the CKEditor5 docs, it doesn't look like there's an 'error' event listed in the events. When there is such functionality (and I can try to look into bringing that about), I can probably do a new pull request to expand the onError function here to add an error listener with the callback.
For our current use case, however, the errors we run into are most likely to be initialization issues, so this functionality would allow us to display errors to the users for the most likely cases and make it easier to identify and fix bugs (and eventually log them directly ourselves).
Feature: Introduced support for `onError` callback that is being called if an error occurred during the editor's initialization. Closes#123.
Thanks to @ansorensen.
ckeditor5-react/src/ckeditor.jsx
Line 95 in 9c60780
The text was updated successfully, but these errors were encountered: