Any WYSIWYG editor that supports "true WYSIWYG"/"inline editing" should automatically be available for Edit's in-place editing. WYSIWYG editors shouldn't have to implement a plugin for both editor.module and edit.module.
In other words: this adds edit.module support to editor.module.
Note: this issue builds on #1833716: WYSIWYG: Introduce "Text editors" as part of filter format configuration, and assumes that Editor.module (a very "light" version of the WYSIWYG API module in Drupal 5/6/7) will be in Drupal 8 core. Patches in this issue are relative to patches in that issue.
Next thing I'm working on (and have started already): figuring out how and where I can simplify Edit module (#1824500: In-place editing for Fields) by making it leverage as much as possible from Editor module:
- The CKEditor implementation for Edit already is leveraging Editor's metadata (see #1873500-1: CKEditor + Edit).
ProcessedTextEditorInterface::checkFormatCompatibility()can go away, since that is now something that can happen while configuring/associating a text editor with a text format.
- Assuming we can add optional metadata to plug-ins implementing
EditorInterfaceand maybe an optional method, we can have all the necessary "true WYSIWYG" text editor metadata in plug-ins written for Editor.
ProcessedTextEditorInterface::addJsSettings()can be replaced by a few lines of code in Edit.module plus leveraging
- Due to all of the above, we should be able to drop Edit's
The heavy lifting (all the
ProcessedTextEditorInterface stuff) to make this a reality needed to happen on the Edit.module side of things, and that's currently done, RTBC, it only needs to be committed: #1874936: Pluggable in-place editors (allow modules to define new Create.js PropertyEditor widgets).
Initial (rough, coupled) version of this patch were posted at #1833716-80: WYSIWYG: Introduce "Text editors" as part of filter format configuration and a very comparable patch was posted at #1833716-93: WYSIWYG: Introduce "Text editors" as part of filter format configuration. It was then decided to leave out this functionality of that patch, to keep the effort focused there. The patch posted here is just a cleaned up version of the latter patch, against the latest version of the patch in #1833716: WYSIWYG: Introduce "Text editors" as part of filter format configuration.
Tests are included.
- Reviews needed.
- Cannot be committed before #1833716: WYSIWYG: Introduce "Text editors" as part of filter format configuration is done.
- Change component to
editor.moduleonce #1833716: WYSIWYG: Introduce "Text editors" as part of filter format configuration is committed.
User interface changes
This introduces a few API changes to editor.module plugins, all of which are optional — they're only necessary if you want your editor.module plugin to also be available for in-place editing through edit.module:
- Update the annotations of the editor.module plugin with
supports_true_wysiwyg = TRUE
Drupal.editors.editorName.attachTrueWysiwyg()(better name suggestions are of course welcome)