-
-
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
Expose ckeditor5-widget API via plugins #8901
Comments
Some notes: Widget – requires WidgetCore, exposes widget utils
WidgetCore – contains the current Widget
* Pros: we get rid of the utils file and keep the utils separated from the core logic.
* Cons: another BC.
CloudServicesCore will expose only classes (constructors). So it's a bit differnt case.
editor.plugins.get( 'Widget' ).utils.toWidget()
editor.plugins.get( 'CloudServicesCore' ).api.Token
editor.plugins.get( 'CloudServicesCore' ).Token
editor.plugins.get( 'Widget' ).toWidget() |
RFC (as ADR): #8925. |
Exposing CS-core was part of this ticket, but it's done already. So, the remaining thing here is ckeditor5-widget. |
What about WidgetTypeAround utils that after the refactoring, will be used by the Widget class?
Should those be moved to the WTA plugin? However, the dependency tree is getting more chaotic. |
The entire idea looks good on the paper. However, when it goes to the implementation, it gets a little messy. If we remove the The easiest way to do that is by adding another parameter to functions. See the examples below:
Adjusting packages like html-embed (1) or page-break (2) is not too difficult. Internal utils have been aligned and packages work fine. However, table (3) or images (4) features are more complex, and passing the Widget plugin through all layers makes our utils uglier. Also, it brings many minor breaking changes. I didn't mention tests, that also (unfortunately) started to fail and require adjusting assertions. My all changes are available on the I know, I suggested removing the utils file in the ADR. But it will require much more changes that we couldn't predict when writing the idea. Right now, I'd like to keep the utils file and add the utils' methods to the Widget class. We could adjust simple cases like (1) or (2) but the more complex shouldn't be touched. However, in the documentation, we should suggest using the new method – using the Widget class and utils that the class provides. |
There has been no activity on this issue for the past year. We've marked it as stale and will close it in 30 days. We understand it may still be relevant, so if you're interested in the solution, leave a comment or reaction under this issue. |
We've closed your issue due to inactivity over the last year. We understand that the issue may still be relevant. If so, feel free to open a new one (and link this issue to it). |
Provide a description of the task
The widget API is available in the DLL, so it doesn't have to be used via plugins. However, we were considering #1012. Also, there's #7823 (a bit related). Hence, it makes sense to expose its API via the plugin.
As for cloud-services-core, we want to remove it from the DLL as it's a link to CF (commercial offer) –> see #8811.
The steps here:
Then, we can do #8811.
The text was updated successfully, but these errors were encountered: