Problem/Motivation

When using the ui_patterns_ckeditor5, each component used in the ckeditor, every component is (needlessly?) wrapped into a <div class="drupal-component"> element which might trow of theming since it will create a new line which makes inline components impossible.

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

loominade created an issue. See original summary.

just_like_good_vibes’s picture

Assigned: Unassigned » just_like_good_vibes

hello and thank you for reporting

just_like_good_vibes’s picture

Assigned: just_like_good_vibes » Unassigned
Status: Active » Needs review

I agree with you, the div wrapper is not needed. It came from old code, where it served to detect an empty render; that check is gone, and nothing on the front end depends on the class. The editing view keeps its own div, CKEditor needs a container for the widget.

I rebased the issue fork's branch on 2.0.x and updated the kernel test: the component root now has to follow the text directly.

Removing the div does not give inline components, though. The widget is a block object, so the editor only places it between paragraphs and splits any paragraph it is pasted into. Real inline embedding needs an inline widget, a span-based preview, and a way to know which components render inline markup, since a div inside a paragraph breaks the paragraph. That would be a follow-up issue.

just_like_good_vibes’s picture

Status: Needs review » Fixed

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.