-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
API for changing selected item for rich combo based plugins #3387
Comments
@jacekbogdanski, @f1ames.
For example.
What can be more useful in this case from your perspective? |
I'm thinking about usage of boolean return from On the other hand, I'm not sure if we should inform successful/failure value change - treating this method as a simple setter may simplify API. Do you see some use cases where such information would be useful? |
Yes, this approach seems a little bit better for me as well. There is also another case when matching might get wrong. We base that richcombo preserve mapping on its side, in case that plugin's author doesn't provide the mapping then also might be no match. The error also seems reasonable for me.
I wonder if there might appear some situation when the browser has some quirks or there is 3rd party plugin which interferes with styles. So there might be needed to know if there was a success of setting richcombo or not. However, if you don't see currently any application in your case, then removing it and API simplification seems like the best option for me. It can be always added in the future. |
I mostly agree with @jacekbogdanski, that using So I'm for simplifying it with |
Type of report
Feature request
Provide description of the new feature
As we already started working on #3306 we will also need API allowing to change combo box selected item. We agreed together with @f1ames and @msamsel that the feature should be possible generic and easy to use.
Current proposition is to extend rich combo API with additional
select
method, accepting filtering function (based mostly on find algorithm) allowing to choose correct style definition. As an example,font
plugin resulting with rich combo component:As some plugins like
font
uses more complex object to resolve correct content style,select
method callback should acceptCKEDITOR.style.getDefinition()
object, extensively used by rich combo related plugins to set content style.It will also require providing some optional method to implement required definition mapping to avoid breaking changes with other rich combo plugins. It may make sense to fully delegate
select
filtering callback into plugin implementing rich combo to avoid rich combo andCKEDITOR.style
dependency or just by providing simple ID toCKEDITOR.style
mapping. Not totally sure which method would be better here, I would leave it to developer decision which seems more verbose / easier to implement.The text was updated successfully, but these errors were encountered: