ckeditor / ckeditor5-angular

Official CKEditor 5 Angular 5+ component.
https://ckeditor.com/ckeditor-5
Other
202 stars 110 forks source link

Upgraded to version 40.0 of all components and custom build will not show in Angular 15 now #393

Closed tlawapsc closed 10 months ago

tlawapsc commented 11 months ago

I created a new custom build using the Online Build editor, I deleted all ckeditor references from node_modules and followed the online instructions to install the custom build again. The compiler throws no errors and there are no errors in the console, but the spot where the ckeditor should render just has an empty

tag inside the tags.

I am importing the editor in my component using the following: import Editor from 'ckeditor5-custom-build/build/ckeditor'; ... public Editor = Editor;

If I change this to use the ClassicEditor it renders fine in the UI: import ClassicEditor from '@ckeditor/ckeditor5-build-classic';

package.json "@ckeditor/ckeditor5-angular": "^7.0.1", "@ckeditor/ckeditor5-build-classic": "40.0.0", "@ckeditor/ckeditor5-core": "^40.0.0", "@ckeditor/ckeditor5-engine": "^40.0.0", "@ckeditor/ckeditor5-utils": "^40.0.0", "@ckeditor/ckeditor5-watchdog": "^40.0.0", "ckeditor5-custom-build": "file:ckeditor5",

Is there a bug in version 40.0 that is making ckeditor not show?

Witoso commented 11 months ago

There's no known issue that v40 custom build is not working. Did you follow the steps from the tutorial?

tlawapsc commented 11 months ago

Yes I followed the steps and it was working prior. I found the issue. If Watchdog is included in the build it exports a "_default" object that has 2 properties of Editor and Watchdog.

declare const _default: {
    Editor: typeof Editor;
    EditorWatchdog: typeof EditorWatchdog;
};
export default _default;

So on your component when you initialize the editor you have to use: public Editor = Editor.Editor;

Witoso commented 10 months ago

Thanks, we will update the docs.