-
Notifications
You must be signed in to change notification settings - Fork 86
How should I handle errors from the <ckeditor /> component? #396
Description
Hi,
I'm trying to figure out how to handle errors thrown when initializing a real time collaboration session. Looking at ckeditor.vue, there isn't an error emit or any kind of error handling except a console.error statement in the block that sets up the editor.
Is there some other way I'm supposed to be doing this? Just having the entire component crash after the user uploads something to start a session isn't acceptable. These are the kinds of errors I need to catch: CKEditorError: realtimecollaborationclient-init-connection-failed. I couldn't find anything in the CKEditor/Vue docs, and the Watchdog feature we're supposed to use doesn't handle errors during initialization.
For context, I'm using a CDN implementation and starting the editor like this:
const cloud = useCKEditorCloud({
version: '47.4.0',
premium: true,
ckbox: { version: '2.9.2' }
})
const editor = computed(() => {
if (!cloud.data.value) {
return null
}
return cloud.data.value.CKEditor.DecoupledEditor
})
const config = computed(() => { ... }
Thanks!