Skip to content

Removing block format (like H1, H2, etc.) not working, if editor wrapper element is not of type div. #976

Open
@SamReciter

Description

@SamReciter

If the editor wrapper element is not of type div, the removing of block formats like H1 etc, is not working as the recognition of the surounding block container in getTopBlockContainer fails. While the traverseUp the isBlockContainer returns true for the wrapper element - traversing goes to far up - and getTopBlockContainer returns the wrapper element instead of the block element itself.
In isBlockContainer the editor div is normaly only excluded as 'div' is not contained in the blockContainerElementNames. I think you should additionally check for the editor wrapper identifier (class,id) or the contenteditable attribute or something like that instead.
Btw. awesome work - everything else is really great with this editor.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions