ckeditor / ckeditor5-react

Official CKEditor 5 React component.
https://ckeditor.com/ckeditor-5
Other
426 stars 100 forks source link

Questions on custom plugins with react and webpack 4 #396

Closed indefinitelee closed 1 year ago

indefinitelee commented 1 year ago

I'm really just having trouble piecing together the different sections of documentation to understand what the recommended approach is when using CKEditor5 in React (v16.8) with webpack(4.41) and a requirement to create custom plugins.

I want to exclude certain features from ckeditor such as cloud and collaboration plugins.

I need to create plugins for new toolbar items which would receive user input. e.g. a Toolbar button which is a phone icon, upon click the user would see a dropdown menu with types of phone numbers to insert, such as Customer Service, Sales, Local Office.

I don't know if those custom plugins would have dependencies on other plugins.

I think the build strategy has an influence on the ability to add plugins and how one does it.

If i just use the quick start react installationnpm install --save @ckeditor/ckeditor5-react @ckeditor/ckeditor5-build-classic will i have any challenges with building and installing custom plugins?

Witoso commented 1 year ago

Hey @indefinitelee! I would advise going with the route that we describe in the React docs as customizing builds and integrating a build from an online builder. This way, you will have a separate folder with the editor and its build process separated from the React build. It will also allow you to write custom plugins.

If i just use the quick start react installation npm install --save @ckeditor/ckeditor5-react @ckeditor/ckeditor5-build-classic will i have any challenges with building and installing custom plugins?

You cannot add plugins to predefined builds. That's why I would propose the method above.

indefinitelee commented 1 year ago

thanks for the advice