Skip to content
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

Move OperationCompressor functionallity to a method on editor.model #6094

Closed
scofalik opened this issue Jan 21, 2020 · 0 comments · Fixed by ckeditor/ckeditor5-engine#1815
Closed
Assignees
Labels
package:engine status:discussion type:improvement This issue reports a possible enhancement of an existing feature.

Comments

@scofalik
Copy link
Contributor

📝 Provide a description of the improvement

https://github.com/ckeditor/ckeditor5-engine/blob/master/src/model/operation/operationfactory.js

Here's OperationFactory in its full glory. Which is not a lot of glory.

I'd like to move this functionallity to a place, which will be reachable from editor. For example, editor.model.createOperationFromJson().

The case here is that we'd like to introduce a plugin, which is needed if we want to let users upload their editor builds to CS. This plugin needs OperationFactory. We'd like that plugin to be automatically added on a CS side, so the user does not need to add this plugin on their own to their build. So, we need to add it to .extraPlugins. But it is not possible, because OperationFactory needs to be imported and this raises duplicate modules error.

If we have editor.model.createOperationFromJson() we would be able to make build uploading easier for our customers.

Two additional things that we need to take under consideration:

  1. I am a little hestitant of having this method in docs, but what can you do 🤷‍♂️. The thing is that it is quite low level stuff and it probably should never be used by integration code or 3rd party plugins. But, yeah, 🤷‍♂️.
  2. We need to check if importing all the operations won't lead to circular deps problem.
@scofalik scofalik added type:improvement This issue reports a possible enhancement of an existing feature. status:discussion package:engine labels Jan 21, 2020
@scofalik scofalik self-assigned this Jan 21, 2020
@Reinmar Reinmar added this to the backlog milestone Jan 27, 2020
Reinmar added a commit to ckeditor/ckeditor5-engine that referenced this issue Jan 29, 2020
Feature: Introduced `Model#createOperationFromJSON()` which is an alias for `OperationFactory.fromJSON()`. Closes ckeditor/ckeditor5#6094.
@Reinmar Reinmar modified the milestones: backlog, iteration 29 Jan 30, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
package:engine status:discussion type:improvement This issue reports a possible enhancement of an existing feature.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants