-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make removing the Image plugin from classic build less cumbersome #526
Comments
There are two problems here:
|
Related ticket: #409. |
There's one more thing that we could do, though, apart from working on default toolbar configurations. We could make the toolbar item loader check whether item exists in the component factory. If it does, then fine – add it to the item collection. If not, then log a warning (instead of throwing an error like now). The warning would come directly from the toolbar view so it could be more clear than the current error. Plus, the editor will work. |
cc @oleq |
I would give decoupling these plugins a try. Didn't check internals so I'm not sure this is the only glue, though.
Sounds like a plan. |
They are completely decoupled. What Wiktor tried to do failed because he used an editor build which has a preconfigured image toolbar. So the image toolbar feature was configured to load buttons which Wiktor removed by removing their plugins.
Could you handle it? |
Yes. I'll handle this thing. |
BTW, this worked fine: import { ClassicEditor } from '@ckeditor/ckeditor5-build-classic/ckeditor';
ClassicEditor
.create( document.querySelector( '#snippet-image' ), {
removePlugins: [ 'ImageToolbar', 'ImageCaption', 'ImageStyle' ],
image: {}
} ) EDIT: OK, that's a different story anyway. |
+100. |
Other: `ToolbarView#fillFromConfig()` will warn when the factory does not provide a component. Closes #291. Closes ckeditor/ckeditor5#526.
Adjusting CKEditor 5 Builds is currently quite cumbersome. As an end user I want to be able to download a CKEditor 5 Build and remove features from it easily, just like it was possible in CKEditor 4 via config.removePlugins.
Unfortunately it's not, especially for Images.
The setup that I tried:
unfortunately resulted in:
Being naive, I tried:
which of course did not work.
What finally helped was:
I guess this is a consequence of the default image config where the image toolbar is defined.
However, going finally to the point: if the
ImageToolbar
plugin requires theImage
plugin and can't operate without it, shouldn't it remove itself automatically whenImage
plugin is removed?Not sure if it's just about Image-related plugins or if there are other plugins with similar problems.
The text was updated successfully, but these errors were encountered: