Quantcast
Viewing all articles
Browse latest Browse all 295773

[META] Support WYSIWYG embedding of entities other than files

Problem/Motivation

Core currently provides support for embedding of images. It is currently impossible to embed a video or a document. Also, when #2801277: [META] Support remote media assets as first-class citizens by adding Media Entity module in core lands we'll need to embed media entities rather than files.

Contrib already has a solution for this. Entity embed is a module that supports embedding of any renderable entity and supports extensive display configuration.

Proposed resolution

There are two possible solutions to the problem:

  1. Move parts of Entity embed in core (simplified text filter) and handle embedding through it. Entity embed display plugins and embed button config entities stay in contrib. This would include API additions which allow contrib authors to provide new Entity embed display plugins that allow for the insertion entities. Existing WYSIWYG functionality would remain the same, unless a user installed a module that provided an embed button which used parts of this new API.
  2. Keep embedding files as we do now, but implement editorial workflow through media entities. This will allow content creators to select from media library or create one by uploading an image. When media entity to be embedded is selected we extract image information behind the scenes and inject it in the body field. Compared to the previous option, this would not introduce any new API additions or plugin types, and would be a one-off CKEditorPlugin just for Media.

The second solution seems to be slightly more preferred than the first one since doesn’t require us to move another module to core right away, which helps us from getting into too much complexity at the same time. Even if we go with the second option we still can move entity embed into core as part of some later minor release.

Remaining tasks

TBD

User interface changes

TBD

API changes

TBD

Data model changes

TBD


Viewing all articles
Browse latest Browse all 295773

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>