-
Notifications
You must be signed in to change notification settings - Fork 280
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
Support style string definition (Fixes #533) #541
Conversation
/cc @qasid |
Just started reviewing :) |
@@ -11,11 +11,15 @@ | |||
// Allows validating props being passed to the component. | |||
propTypes: { | |||
/** | |||
* The style the button should handle as described by http://docs.ckeditor.com/#!/api/CKEDITOR.style | |||
* The style the button should handle. It can be a style object as described by http://docs.ckeditor.com/#!/api/CKEDITOR.style | |||
* or a string pointing to an object inside the editor instance configuration |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey Chema,
This sentence "a string pointing to an object inside the editor instance configuration" will need an example. We shall document this for 1.2.3 release and I'm not sure what exactly could be this string.
Could you please add an example to this comment?
Thanks,
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, I'll add an example tomorrow. You can see the usage in the buttons that are now configured with the string. For example,
style: 'coreStyles_bold'
will try to get the style from editor.config.coreStyles_bold
and
style: 'myPlugin.myCustomObject.myCustomStyle'
will try to get it from editor.config.myPlugin.myCustomObject.myCustomStyle
Do you think that would be clear enough? If so, I'll push that tomorrow morning! :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, this will be enough and the whole change is great!
Thanks,
Pushed new commit with improved docs 😉 |
Just started reviewing :) |
Thank you, pull request merged! |
Hey @ipeychev, this is the improvement we discussed for #533.
Now, this will work out of the box: