Problem/Motivation

When the newly introduced "Show element IDs in the editor" option and the core "Show Blocks" feature are enabled at the same time in CKEditor 5, a visual conflict occurs. The ID badge directly overlaps the HTML tag label (e.g., h2, p) in the top-left corner, making both labels hard to read.

Steps to reproduce

1. Enable "Show element IDs in the editor" in the text format configuration.
2. Ensure the "Show Blocks" button is in the active toolbar.
3. Create a piece of content, add an ID to a heading or paragraph, and toggle "Show Blocks" on.
4. Observe that the blue ID badge sits directly on top of the block label.

Proposed resolution

Add a small CSS adjustment to introduce proper spacing or offset for the ID badge when it coexists with the core Show Blocks styles.

User interface changes

Minor visual fix in the CKEditor 5 editing view to prevent overlapping labels.

bug

CommentFileSizeAuthor
#5 ss-fix.PNG23.73 KBangel_devoeted
ss3.PNG28.45 KBangel_devoeted
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

angel_devoeted created an issue. See original summary.

dieterholvoet made their first commit to this issue’s fork.

dieterholvoet’s picture

Status: Active » Needs review
angel_devoeted’s picture

Status: Needs review » Reviewed & tested by the community
StatusFileSize
new23.73 KB

Thanks @dieterholvoet.

It looks good to me.

fix

  • dieterholvoet committed 1aa3cdf6 on 1.0.x
    fix: #3608143 UI conflict between ID Attributes labels and core Show...
dieterholvoet’s picture

Status: Reviewed & tested by the community » 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.