- ๐ฎ๐ณ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
almost 2 years 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
almost 2 years ago Not currently mergeable. - @smustgrave opened merge request.
- last update
almost 2 years ago 30,146 pass - Status changed to Needs work
almost 2 years 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
about 1 year 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
about 1 year 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
about 1 year 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
about 1 year 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.
- ๐ฎ๐ณIndia vasantha deepika Coimbatore
vasantha deepika โ made their first commit to this issueโs fork.
- ๐ฎ๐ณIndia vasantha deepika Coimbatore
Let me check the pipeline issue and try to fix it.
This MR only includes CSS changes, but the failure seems to be caused by a JS functional test (JSWebAssertTest), which appears to be unrelated to this update.
I will investigate further and re-run the pipeline if needed. Will share findings shortly.
Additionally, I have increased the dropdown visibility by adjusting the --ck-toolbar-dropdown-max-width value from 90 to 95 to ensure the CKEditor 5 toolbar dropdown displays correctly.
- ๐ฎ๐ณIndia vasantha deepika Coimbatore
The MR !8096 seems fine, but the pipeline is failing due to test-related files.
I'm attaching a patch generated from the MR [3328095-mr8096.patch] in case anyone needs it to proceed without being blocked, until the MR is merged.
The Needs Review Queue Bot โ tested this issue. It fails the Drupal core commit checks. Therefore, this issue status is now "Needs work".
This does not mean that the patch necessarily needs to be re-rolled or the MR rebased. Read the Issue Summary, the issue tags and the latest discussion here to determine what needs to be done.
Consult the Drupal Contributor Guide โ to find step-by-step guides for working with issues.