sibiraj-s / ngx-editor

🖋️ Rich Text Editor for angular using ProseMirror
https://sibiraj-s.github.io/ngx-editor/
MIT License
458 stars 191 forks source link

Error in ToggleCommandComponent - Property '"toolbarItem"' is incompatible with index signature. Type '{ alias: "toolbarItem"; required: false; }' is not assignable to type 'string'. #518

Closed maree16 closed 9 months ago

maree16 commented 9 months ago

What happened?

Hi Apologies first ! It is my first issue so bear with me . I installed ngx-editor using npm

and i added imports in my module.ts

on build or ng serve , it gives me following error

Error: node_modules/ngx-editor/lib/modules/menu/toggle-command/toggle-command.component.d.ts:26:97 - error TS2344: Type '{ toolbarItem: { alias: "toolbarItem"; required: false; }; }' does not satisfy the constraint '{ [key: string]: string; }'. Property '"toolbarItem"' is incompatible with index signature. Type '{ alias: "toolbarItem"; required: false; }' is not assignable to type 'string'.

26 static ɵcmp: i0.ɵɵComponentDeclaration<ToggleCommandComponent, "ngx-toggle-command", never, { "toolbarItem": { "alias": "toolbarItem"; "required": false; }; }, {}, never, never, false, never>;

× Failed to compile.

I am using following package "ngx-editor": "^16.0.1",

Version

16.0.1

Angular Version

!5.0.1

What browsers are you seeing the problem on?

Chrome

Link to reproduce

No response

Relevant log output

No response

Willing to submit a PR?

None

sibiraj-s commented 9 months ago

editor v16 needs angular 16. You can try after fixing the version mismatch.

maree16 commented 9 months ago

Hey Thank you ... i am going to use 15.3.0 till our project move to Angular 16

github-actions[bot] commented 8 months ago

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs and link to relevant comments in the thread.