- π¬π§United Kingdom scott_euser
I am hopeful that sorting https://www.drupal.org/project/footnotes/issues/3405986 β¨ Switch to Modal window to allow more editor control Fixed will also sort this issue and hope to provide an upgrade path. Going to postpone this one for now.
- Status changed to Postponed: needs info
11 months ago 9:06pm 6 February 2024 - Status changed to Closed: outdated
10 months ago 9:40pm 23 February 2024 - π¨π¦Canada nickdickinsonwilde Victoria, BC (T'So-uke lands)
I can confirm that (at least with Claro/Gin theme) β¨ Switch to Modal window to allow more editor control Fixed fixed this issue.
- π¬π§United Kingdom alanoakden
I just want to add a comment in here for anyone still dealing with CKeditor 4 and seeing this issue that may need a fix sooner than moving to CKeditor 5 and applying the patch outlined in this issue π CKEditor 5 balloons invisible when CKEditor 5 is used inside a modal Needs work (nevertheless, you should really be using CKeditor 5 and indeed I will look to get the project I'm working on to move to this)
It appears CKeditor 4 doesn't have the ui-dialog class at all, this seems pretty essential to make things work (nevermind if you then see the issues mentioned above)
In my case, i found simply adding `ui-dialog` as a class to the div that also has `cke_reset_all cke_dialog_container` classes already, made all functionality click into gear and work as expected.
I have a custom admin subtheme theme added to the project, i did a pre-process hook in the .theme file to add a library on the relevant content type node-edit pages
function MY_THEME_form_alter(&$form, &$form_state, $form_id) { if($form_id == 'node_layout_page_edit_form'){ $form['#attached']['library'][] = 'MY_THEME/ckEditorInteractivity'; } }
And then wrote JS similar to this (couldn't see a way to add the class via patch or similar).
/** * @file * MY THEME behaviors. */ (function (Drupal) { 'use strict'; Drupal.behaviors.myTheme = { attach (context, settings) { /** TEMPORARY JS (until CKEditor5 is implemented) that only runs on layout page nodes. * This ensures that ckEditor modals are clickable and can be interacted with on layout page nodes. * This will observe the DOM and add a class to the CKEditor dialog window once the editor window * itself is added to the DOM. */ const observer = new MutationObserver(function(mutations) { mutations.forEach(function(mutation) { if (mutation.addedNodes && mutation.addedNodes.length > 0) { // element added to DOM let hasClass = [].some.call(mutation.addedNodes, function(el) { return el.classList.contains('cke_dialog_container'); }); if (hasClass) { let ckEditorDialogueWindows = document.getElementsByClassName("cke_dialog_container"); for (const window of ckEditorDialogueWindows) { window.classList.add('ui-dialog'); }; } } }); }); var config = { attributes: true, childList: true, characterData: true }; observer.observe(document.body, config); } }; } (Drupal));
This JS observes the page and once CKeditor inserts its dialog divs, it adds the 'ui-dialog' class
Of course, don't forget to add the JS file reference in your subtheme libraries file
ckEditorInteractivity: js: js/ckEditorAddDialogClass.js: {}