Core: provide a Editor
creation factory
#6015
Labels
package:core
package:editor-balloon
package:editor-classic
package:editor-decoupled
package:editor-inline
resolution:expired
This issue was closed due to lack of feedback.
status:stale
type:feature
This issue reports a feature request (an idea for a new functionality or a missing option).
Before proposing anything, let me illustrate the two cases I've faced recently, which motivated this issue.
Case 1
While working on ckeditor/ckeditor5-markdown-gfm#30, I've noticed that, although the plugin is setting
editor.data.processor
to the GFM data processor, the editor classes (classic, inline, etc.) are in any case pointlessly (at that point) setting that same property to the HTML data processor (which later on is overwritten by the plugin).I figured that it would be safe to set the data processor only after initing all plugins, if no plugin set it. Then, I've also figured that this would involve touching all four official editor classes, basically deleting and pasting the same lines, in the same places. It would not fix other editors out there though.
Case 2
While coding a custom editor class, it is depressing the amount of copy/paste that has do be done. One does it without even thinking why, copying the boilerplate from the relative documentation guide.
All that sounded overcomplicated and pointless. I see this as a weak part of the API.
Proposal
The creation of a factory that will remove most of the boilerplate from the editor classes and centralize it in a single place.
If you'd like to see this feature implemented, add a 👍 reaction to this post.
The text was updated successfully, but these errors were encountered: