Problem/Motivation
One of the great new features that's about to ship with Drupal 8.8 is the ability to embed media within CKEditor. https://wimleers.com/blog/media-embedding-drupal-8.8 While #2954378: Use Media images in Umami demo showcases Media in fields and the default imagery in Umami (hooray!), when you insert an image into CKEditor, you're still using the old "legacy" images.
Proposed resolution
- Add the new "Media" button to the toolbar (ideally, replacing the image button, but probably needs discussion).
- Allow at least images + remote video. Perhaps others?
- Perhaps, additionally set up and allow content authors to select from multiple media displays (basically showing off #3074608: Optionally allow choosing a view mode for embedded media in EditorMediaDialog as a way to resize images/other media).
Remaining tasks
- Discuss the above
- Write a patch
- Make it so!
User interface changes
Yes! CKEditor's image button gets replaced with a Media button, and it uses that flow instead.
API changes
Shouldn't be.
Data model changes
Probably. We will presumably need to change some default config to make this a reality.
Release notes snippet
The Umami demo now showcases Drupal 8.8's new ability to embed media within the WYSIWYG editor.
Comment | File | Size | Author |
---|---|---|---|
#11 | interdiff_9-11.txt | 810 bytes | shaal |
#11 | ootb-media-library-ckeditor-3086965-11.patch | 5.04 KB | shaal |
#11 | 3086965-11-bundled-with-2954378-86--TEST-ONLY.patch | 144.05 KB | shaal |
#8 | 3086965-9-bundled-with-2954378-86--TEST-ONLY.patch | 143.98 KB | shaal |
#8 | interdiff_3-9.txt | 679 bytes | shaal |
Comments
Comment #2
kjay CreditAttribution: kjay commentedThis is great. I'll add this issue to the updates I'm currently working on so that we have new tasty feature content!
The original designs proposed a simple image embedded on an article (https://www.drupal.org/files/issues/Umami%20-%20Article%20-%20v1%20-%20D...) which is going to be no problem to use one of the new images, and we can discuss this issue at our next meeting to work out how we plan to integrate the video.
Comment #3
shaalI created an initial version so we can test it out.
I used the 3x2 that Umami is using for most image as default image style for new images added.
Please note: that this patch is depending on the latest patch from #2954378: Use Media images in Umami demo because that's where all the media view modes are being defined.
And that's how it looks -
Comment #5
shaalUploading a patch that includes the required umami-media-images patch, to make sure that test can pass.
Comment #8
shaalFixed tests error.
Added a bundled test-only patch, that includes the newer media-images patch #86.
Comment #11
shaalFixing test errors.
Comment #12
markconroy CreditAttribution: markconroy as a volunteer and at Annertech commentedI've reviewed this along with @shaal and am happy to mark it RTBC - even though I don't like the idea of images added via wysiwyg :-)
Comment #13
markconroy CreditAttribution: markconroy as a volunteer and at Annertech commentedComment #14
shaalTo clarify, after #2954378: Use Media images in Umami demo gets committed,
https://www.drupal.org/files/issues/2019-10-13/ootb-media-library-ckeditor-3086965-11.patch
is ready to be merged.Comment #17
webchickGreat work, everyone! Committed and pushed to 9.0.x; 8.9.x; 8.8.x; Thanks SO much, all!!