- Issue created by @Mehrdad201
- ๐ซ๐ทFrance g.abderrahim Paris, Ile de France
Hello @mehrdad201,
If i may ask what was the module you were using for ckeditor4 for div wrapper ?
Much appreciated - ๐ฎ๐ทIran Mehrdad201
Dear @gabderrahim,
In Drupal 7, when using CKEditor 4 in full mode, you can see the div wrapper option. However, I believe you need to add the div container button to the active toolbar for it to appear.
This is quite easy. You can also add a ckeditor.styles.js file to your theme folder and define all elements with custom CSS classes.But in Drupal 11, you're required to use CKEditor 5, as version 4 is deprecated. Unfortunately, many of the features available in CKEditor 4 are no longer present.
If you're using Drupal 10, I recommend checking out ckeditor_div_manager module, which adds a div wrapper button to CKEditor 5. However, it's very basic and lacks the advanced capabilities that CKEditor 4 had in Drupal 7.
Also, please note that ckeditor_div_manager is not supported in Drupal 11.
I'm honestly very disappointed.
- ๐ฆ๐บAustralia timfletcher
@sime asked about the CKE4-5 plugin issue a while back ๐ฌ Documentation for cke5 suggestgs cke4 plugin Active
I'd advise against using the 3.x release of the CKE Div Manager module โ if you are using CKE5.
I've been running it in Drupal 10 and now patched in Drupal 11 (just adding '11' to the
core_version_requirements
inckeditor_div_manager.info.yml
was enough), and it has broken in the update from Drupal 11.1.8 > 11.2.The issue seems to be that the Div Manager module references the deprecated CKE4 Div manager plugin, which has no CKE5 equivalent or clear upgrade path - yet this module uses it with CKE5.
This breaks because Drupal 11.2 updates the CKE5 version used in Core โ to one that is incompatible with the CKE4 Div Manager plugin as the location of the CKE icons pack changes.
This also prevents any other non-CKE operations that run on the frontend from executing, such as cleaning HTML, fixing broken tags, and critically, stripping prohibited tags like
<script>
!I'll keep hunting for a future-proof way to manage divs via the UI for editors. It definitely sucks that pretty basic functionality is still missing from CKE5 in Drupal. A lot of progress has been made, but we are being forced to jump from the sinking ship onto the mostly-built one.
- ๐บ๐ธUnited States nicxvan
It's there any reason you've not updated to Drupal 10 instead of looking at 11? It's still a fully supported version of Drupal and will be until December of next year.
Also, to answer your question about what you can do. You can test patches that provide support for Drupal 11, for example the module you mentioned there is an issue here: ๐ Automated Drupal 11 compatibility fixes for ckeditor_div_manager Needs review this issue has been open for over a year and only just started getting reviews in March.
If a module has not updated you can apply for maintainership and provide releases helping the whole community.
That being said I think you can add div with classes natively in ckeditor 5 but please don't quote me I'm not super familiar with that plugin.
- ๐บ๐ธUnited States nicxvan
Made an attempt to update the title. Please update it if that's not accurate.