- ๐ฎ๐ณIndia ravi kant Jaipur
The solution of remove dropdown of extra tools in CKEditor is providing by CKEditor and it is "Button divider". It will break the CKEditor toolbar in next line.
How to use?
- Edit preferred "Text Format". Mostly using Full-HTML.
- Navigate to "Toolbar configuration"
- Find the "button divider" at the right-top of the active-toolbar. There are two types of button dividers. 1. Divider 2. Wrapper
- Drage the wrapper divider and place it on the active toolbar where the next line will be starting.
- Status changed to Active
over 1 year ago 3:25pm 2 August 2023 - ๐บ๐ธUnited States smustgrave
Moving to active as there is nothing to review
#9 seems to describe building a text editor to be narrow and only have a few buttons each line vs responsive, which I believe was the discussion before.
Correct me if I'm wrong.
- ๐บ๐ธUnited States smustgrave
tried #6 but didn't seem to work for me.
- Open on Drupal.org โEnvironment: PHP 8.2 & MySQL 8last update
over 1 year ago Not currently mergeable. - @smustgrave opened merge request.
- last update
over 1 year ago 30,146 pass - Status changed to Needs work
over 1 year ago 9:45pm 8 September 2023 - ๐บ๐ธUnited States smustgrave
Found the css causing the issue. It's from ckeditor5. It's applying width: max-content.
I'm overriding that and seems to work but sure it's not ideal. Thoughts?
- ๐ช๐จEcuador jwilson3
I was already experiencing this on a site with Layout Builder + CKEditor 4 and my workaround was to just widen the LB sidebar flyout. The edge of the flyout is drag-enabled in some contexts, (but I did notice unfortunately not all contexts, though I cannot now remember where it was set to a fixed width). IMHO, the flyout should almost always be wider especially on larger screens. If you're editing a block in an LB page, there is not much use to still need to be able to view the entire layout builder, so it could easily be a flyout that overlays the main page content.
- ๐บ๐ธUnited States bkosborne New Jersey, USA
I think this is a legit bug, but the workaround to get this behaving as it did in CKE4 is mentioned in #9. Just add the "wrapping" button divider anywhere in the toolbar (even as the last item). That will prevent CKE5 from trying to render everything on one completely.
- ๐ง๐ชBelgium RandalV
Thanks to #9 and #16, I can confirm that adding the "wrap"-item even as the last item on the bar is a solid workaround until a permanent fix can be provided.
It wraps the excessive items neatly on a second row (as was the behaviour in CKEditor4 if I'm not mistaken). Redwan Jamous โ made their first commit to this issueโs fork.
- Merge request !8096Resolve #3328095 "Ckeditor 5 toolbar dropdown" โ (Open) created by Unnamed author
- Status changed to Needs review
7 months ago 11:39am 16 May 2024 Created a MR that fixes the issue using CSS container queries.
The--ck-toolbar-dropdown-max-width
variable will be set to 90% of the editor's width instead of 60% of the viewport's width.Adding a patch file to use with composer...
Redwan Jamous โ changed the visibility of the branch 3328095-ckeditor-5-toolbar to hidden.
Redwan Jamous โ changed the visibility of the branch 11.x to hidden.
- Status changed to Needs work
7 months ago 2:42pm 16 May 2024 - ๐บ๐ธUnited States smustgrave
If a new solution is being proposed issue summary should match.
Also before/after screenshots need to be added to the issue summary.
- Status changed to Needs review
7 months ago 8:35pm 17 May 2024 Thank you, @smustgrave! I'm updating the issue summary...
Unfortunately, the previous fix doesn't work well while source editing mode in CKEditor is active.
To overcome the issue, the container can be the parent element (
.ck.ck-editor
) instead of.ck.ck-editor__top
.However, changing the css from:
.ck.ck-editor__top { container-type: inline-size; container-name: ck-editor; } @container ck-editor (width > 0) { .ck-dropdown__panel { --ck-toolbar-dropdown-max-width: 90cqw; } }
To:
.ck.ck-editor { container-type: inline-size; container-name: ck-editor; } @container ck-editor (width > 0) { .ck-dropdown__panel { --ck-toolbar-dropdown-max-width: 90cqw; } }
isn't enough because off-canvas reset (
core/misc/dialog/off-canvas/css/reset.pcss.css
) is applyingall: revert;
with higher specificity which will overwrite ourcontainer-type
andcontainer-name
.Adding
.ck-editor
to the list of elements excluded from the off-canvas reset rules would fix the issue, but I'm not sure about this change.We currently have the following selector in off-canvas reset:
#drupal-off-canvas-wrapper *:where(:not(svg, svg *, .ck-reset *, [data-drupal-ck-style-fence] *, .ui-resizable-handle))
We're excluding all children elements of
.ck-reset
but not.ck-reset
itself (unlike svg).The new proposed selector:
#drupal-off-canvas-wrapper *:where(:not(svg, svg *, .ck-reset, .ck-reset *, [data-drupal-ck-style-fence] *, .ui-resizable-handle))
Also, CSS linting checks are failing because of the
cqw
unit, so I will be creating a separate issue to add container query units to the allowed units since they're now supported in all major browsers.- Status changed to Needs work
7 months ago 3:45pm 19 May 2024 - ๐บ๐ธUnited States smustgrave
Thanks for updating. Appears to have some failures in MR.
- ๐ฌ๐งUnited Kingdom specky_rum
Patch in #24 fixes this for me. Had the same problem but caused by the editor being setup within vertical tabs on the Claro theme which prevents overflow.