Skip to content

How should I handle errors from the <ckeditor /> component? #396

@NTaylor23

Description

@NTaylor23

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!

Metadata

Metadata

Assignees

Labels

squad:coreIssue to be handled by the Core team.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions