-
-
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
WidgetToolbarRepository could warn user if it gets empty array of items #4591
Comments
Recently I've made such a mistake. I've created the following config: {
media: {
toolbar: [ 'comment' ],
}
} and I was surprised that the comment button doesn't show up. Finally, I've found that I have a typo and it should be |
And I remember that there was some idea in the past to consume the editor configuration (or maybe there wasn't?). That would be super useful to have an information like:
But that would require at least some small changes in every plugin that uses editor's config. |
The idea is very nice (I do not remember it was suggested before), but as you mentioned we should change plugins to do it... Or not. We can check if |
Right, we can check |
I'll extract the idea to the ticket in the CKE5 since I think it could be quite nice and low costing. |
👍 But I think we should handle it in the next iteration when we will introduce debug mode. |
I'm closing this because widget toolbar should not warn an error. Instead, it should make sure to not show the toolbar at all if it's empty. Why? Because a developer who's integrating CKEditor 5 with his app may want to hide some toolbar and then he/she should be able to configure it to Passing a non-predefine (registered) config property to |
Follow-up of ckeditor/ckeditor5-widget#54.
For now, it might happen that the user will make a typo in the config and without any error, the toolbar will be visible as empty.
This warning could be inside the
WidgetToolbarRepository#register()
or inside every toolbar (the second approach would be slightly better as it could have the more meaningful message, e.g.The "image.toolbar" config is undefined or an empty string. Please, make sure that your config doesn't contain a typo
.The text was updated successfully, but these errors were encountered: