How to document which editor interfaces are required by specific features? #303
Labels
type:feature
This issue reports a feature request (an idea for a new functionality or a missing option).
type:improvement
This issue reports a possible enhancement of an existing feature.
Milestone
This issue is based on #302.
The ckeditor5-core package is just a framework for creating RTEs. Final implementations, called also creators, are provided by other packages. Those creators extend base classes (atm it's
Editor
andStandardEditor
) exposed by the core.Now, on each level (
Editor
->StandardEditor
->ClassicEditor
) we've got a different set of properties available. E.g.Editor
doesn't havekeystrokes
property because it's UI related. It appears inStandardEditor
which is understood as "browser based editor with a single editable".Most features are split into their "engine" and "full" parts. The
BoldEngine
provides only the command, schema and converters. It's compatible with editors which havedocument
andcommands
andediting
properties, so byEditor
's children (there's a trick –Editor
's constructor doesn't setediting
property but defines it and says that it must be set). However,Bold
requires much more –keystrokes
andui
. It will work withStandardEditor
and every other editor implementing the same interface.What we're missing are definitions of these interfaces and features defining what kind of interface they need. Without them, end-developers won't know what kind of creator is needed for the set of features that he/she is using.
The easiest solution will be to create a set of standard interface definitions and in each feature's documentation define which interface must be provided.
We can also automate this by introducing new properties. E.g.
Editor
could have aimplements
property which is an array of strings (interface names) and featurerequiresEditor
(or something more intuitive) which defines which interfaces the editor must fulfill. If requirements are not met, we could throw an error.The text was updated successfully, but these errors were encountered: