ckeditor / ckeditor4-angular

Official CKEditor 4 Angular component.
Other
55 stars 32 forks source link

Provide custom plugins inplementation #228

Closed synopss closed 2 years ago

synopss commented 2 years ago

Are you reporting a feature request or a bug?

Feature request

Other details

The idea is to be able to create custom plugins as it is possible with the non angular ckeditor library : https://ckeditor.com/docs/ckeditor4/latest/guide/plugin_sdk_sample.html

Comandeer commented 2 years ago

Could you provide a sample use case for such a plugin system?

synopss commented 2 years ago

@Comandeer Sure, for example, being able to create a custom button that will trigger something outside of the textfield (let's say a modal where you can select something to put in the editor)

Comandeer commented 2 years ago

The use case you described does not require adding the whole mechanism for custom plugins. The editor exposes the API that can be used to manipulate the contents of the editor from the outside, e.g. inserting HTML.

synopss commented 2 years ago

Ok, let's try to explain you one use case.

I am using this editor; I can add a lot of buttons giving styles to the content that I am writing into the editor. Those buttons are native.

I would like to add a custom button that will add a specific text into the texterea. It only has to be triggered after clicking on this specific button.

Right now, I have to use a custom button outside the editor because I can't add it into the editor. That's whole point of my proposal, being able to create custom buttons with custom triggering.

Comandeer commented 2 years ago

You can add buttons to the editor without creating a new plugin: https://codesandbox.io/s/hidden-tdd-xmii16?file=/src/app/app.component.ts

Additionally, if the additional plugins are needed, you can provide a link to the custom CKEditor 4 build that would contain such a plugin.

We do not plan to duplicate plugin functionality in packages integrating CKEditor 4 with various frameworks.