Closed (works as designed)
Project:
CKEditor 5 Plugin Pack
Version:
1.2.1
Component:
User interface
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
2 Oct 2024 at 07:31 UTC
Updated:
18 Oct 2024 at 09:40 UTC
Jump to comment: Most recent
Comments
Comment #2
senzaesclusiva commentedComment #3
mdusza commentedThanks for reaching out. This indeed might be a limitation of the plugin, but it seems the code that you wanted to include in the issue got removed. Please let us know what do you want to achieve and we'll look into it and try to see if we can help :)
Comment #4
senzaesclusiva commentedOh, sorry, thanks for you replay
I didn't put it in by mistake as a code and the system rejected it.
I meant something simple like this. A simple 'div' tag for example that could allow it to be handled by css.
e.g.
html
css
Comment #5
salmonek commentedHi @senzaesclusiva
I confirm that this is a limitation of the editor. We would need a plugin allowing a
divelements manipulation. for now there is only General HTML Support plugin which allows to recognize them as valid elements, but adding and editing divs is only available through source mode.There is a issue in Drupal core related to that functionality:
https://www.drupal.org/project/drupal/issues/3418322
Which depends on the CKEditor's issue:
https://github.com/ckeditor/ckeditor5/issues/6462
Comment #6
salmonek commentedI just realised that there is some kind of workaround available with "CKEditor 5 Templates" module (part of Plugin Pack).
You can define a template with code:
Then in the editor first add that template and replace
{placeholder}text with the image.You will still need the source plugin active in order to have General HTML support plugin active.
Short configuration info for the Templates sub-module is available at: https://www.drupal.org/docs/extending-drupal/contributed-modules/contrib...
And feature guide at: https://www.drupal.org/docs/extending-drupal/contributed-modules/contrib...
Comment #7
senzaesclusiva commentedHi @salmonek
Thanks for your brilliant and simple workaround. I would never have guessed it without looking at the other plugin pack modules.
The solution is very intuitive even for those who only have to deal with writing articles.
Thanks again to you and this wonderful community.
Comment #8
salmonek commentedGlad to be of help.
I'm marking this as working as designed since CKEditor 5 currently doesn't have dedicated plugin for editing div's.
Once this functionality will be available (and won't go into core), we'll most probably will add the integration.