Just installed Ckeditor5-Angular and typings issue
Hi,
I Just created a sample app where i was trying to integrate CKEditor-angular, as soon as i did it, i got the following error
Error: src/app/app.component.html:1:12 - error TS2322: Type 'typeof ClassicEditor' is not assignable to type 'EditorConstructor'.
The types returned by 'create(...)' are incompatible between these types.
Type 'Promise<ClassicEditor>' is not assignable to type 'Promise<Editor>'.
Type 'ClassicEditor' is not assignable to type 'Editor'.
Types of property 'delegate' are incompatible.
Type '(...events: string[]) => EmitterMixinDelegateChain' is not assignable to type '(events: string[]) => any'.
Types of parameters 'events' and 'events' are incompatible.
Type 'string[]' is not assignable to type 'string'.
After a few stackoverflow answers was able to resolve it by creating a typings.d.ts file with the following,
declare module '@ckeditor/ckeditor5-build-classic'
{ // or other CKEditor 5 build.
const ClassicEditorBuild: any;
export default ClassicEditorBuild;
}
This however resolved the issue with the classic editor, while i am trying to do the same for BaloonBlock Editor, i am unable to resolve it.
Same problem here. @shaklin-essenvia where did you put the file you created?
Same problem here. @shaklin-essenvia where did you put the file you created?
src/app/typings.d.ts
it woks if you are using ckeditor in application, but in library I still have the same issue, any solution for that?
My workaround for this in order to be able to use ckeditor in a library is
export class RichTextEditorComponent {
editor = ClassicEditor as {
create: any;
};
//...
}
<ckeditor
[editor]="editor"
></ckeditor>
The component contains its typings starting from version 6.0.0 (the latest version is equal to 7.0.0). It requires CKEditor 5 in version 37+ (latest 38.1.1).
Could you try to use the setup environment using the mentioned version above and try to reproduce the issue?
Closing due to lack of activity. If you think the issue is still not resolved, please, re-open it and provide the feedback we asked for.