Skip to content

Block editor code causing page blocks in the site editor to go inline #83

@KrashKartMedia

Description

@KrashKartMedia

Love the WDS-Bt theme. Used clause Code to clone it down - install and run dependencies and have my own blocks/patterns built. However ,I had one issue. When I went into the site editor /wp-admin/site-editor.php and I was looking at the block on the page - all of the paragraph blocks, headings and other blocks were all inline. The front end looks great. editing the page on the backend was tough. You could still do it, but it was all inline. Where editing the backend should look almost similar to viewing the page on the front end.

The fix was removing this CSS rule from the original WDS-BT theme:

.block-editor-block-list__block [contenteditable] {
display: inline;
}

This was forcing all content editable elements (headings, paragraphs) to render as inline in the editor, which collapsed everything onto one line. With that rule gone, your headings and paragraphs in patterns/blocks should now display as proper block-level elements with visible spacing in the editor.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions