Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Custom build issues (object, instead of function) - Documentation issues? #252

Open
yvesh opened this issue Jun 17, 2023 · 1 comment
Open

Comments

@yvesh
Copy link

yvesh commented Jun 17, 2023

Hello,

using Vue 3, Vite, TS and an custom ckeditor 5 build (nothing fancy, just some plugins, no watchdog) following the documentation got me an "Error: this.editor.create is not a function".

import Editor from 'ckeditor5-custom-build/build/ckeditor';

returns an Object and not a function:

{Editor: ƒ, EditorWatchdog: ƒ}

Workaround:

<CKEditor.component :editor="Editor.Editor"
 />

or just import it correctly:

import { Editor } from 'ckeditor5-custom-build/build/ckeditor'; // Stated different in the docs

Or did I miss something?

Thanks!

@Witoso
Copy link
Member

Witoso commented Jun 20, 2023

Thanks for reaching out @yvesh. Very strange indeed. Are you sure watchdog was not added as a dependency of some plugin? Check the src/ckeditor.js or package.json in the Online Builder folder.

I only replicated this situation when I added the watchdog plugin. Export in src/ckeditor.js looks like this then:

export default { Editor, EditorWatchdog };

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants