Problem/Motivation
Media Library integrates with both CKEditor 4 and CKEditor 5. CKEditor 4 will be deprecated and removed from core in Drupal 10, so Media Library's integrations should be owned by the CKEditor module instead of the Media Library module.
Proposed resolution
Move all of the integration code from Media Library to CKEditor:
- Review plugin in
core/modules/medialibrary/js/plugins/drupalmedialibrary (appears to have CKEditor 4 integration) and move as appropriate
- Move
Drupal\media_library\Plugin\CKEditorPlugin to CKEditor's namespace and update accordingly. (Deprecate the old version.)
- Look at
core/modules/media_library/src/MediaLibraryEditorOpener.php which mentions CKEditor in the text. Maybe just say "text editor integration"?
- Move the following tests to CKEditor's namespace:
core/modules/media_library/tests/src/FunctionalJavascript/CKEditorIntegrationTest.php
core/modules/media_library/tests/src/FunctionalJavascript/CKEditorIntegrationTest.php
- Move integration code from
media_library.module to (e.g.) ckeditor.module.
There is a diffstat of potential Media Library integration code to remove but it only removes the code, rather than moving it to CKEditor 4 and updating namespaces/etc.
Do not alter any CKEditor 5 Media Library integration.
Remaining tasks
TBD
User interface changes
TBD
API changes
TBD
Data model changes
TBD
Release notes snippet
TBD
Comments
Comment #2
xjmComment #3
xjmComment #5
wim leersComment #7
wim leersQuoting
\Drupal\media\Plugin\CKEditorPlugin\DrupalMediaLibrary:👍 (So we can move this into the CKEditor module without breaking BC.)
Comment #8
wim leersSome very clear failures I'll need to figure out.
Comment #9
wim leersShould be green now!
Comment #10
wim leersI can smell the RTBC 😜
Comment #11
lauriiiDid few searches and went through all of the media library files quickly to make sure we didn't miss anything. I think this is all good now!
Comment #13
catchCommitted/pushed to 10.1.x, cherry-picked to 10.0.x and 9.5.x, thanks!