Issue #3564129: Bundled CKEditor conflicts with Drupal
Closes #3564129
This removes CKEditor and replaces it with Lexical. This is because CKEditor is bundled with Drupal and causes conflicts. Using Drupal's CKEditor object is tricky because:
- CKEditor isn't designed to allow multiple instances to be loaded
- Plugins aren't loaded unless CKEditor is already loaded on the page. Canvas is using a custom API to fetch additional JS and CSS to load plugins:
PATCH https://drupal.ddev.site/canvas/api/v0/form/component-instance/canvas_page/9
- We have no guarantee on which version of CKEditor is loaded
- We had to do some workarounds in our app to work with CKEditor when inserting our floating menu icon, which can now be removed
- We already have some issues with CKEditor's modals that we'd tabled for another time
Testing instructions
-
Test that when Canvas is loaded with a CKEditor component it does not conflict with this app (use the Banner component to test) -
Test that when you are editing a component, you can refresh the page and load Conductor successfully (i.e. the URL is e.g. https://drupal.ddev.site/canvas/editor/canvas_page/9/component/c527cada-9e76-4cbf-9abd-861dbf8a734f) -
Test that the Lightbulb menu and content generation work as expected -
Test that WYSIWYG editing features work as expected -
Test that the Copy Text button works as expected (if you are copy and pasting into another WYSIWYG bear it mind it will only show the formatting for elements it supports e.g. you could copy text into the Banner component for testing by setting some text as bold, but the headings would not show) -
Test that content is saved back to Conductor correctly
Edited by Sally Young
