Skip to content

Empty documents and placeholders #2

@oyeanuj

Description

@oyeanuj

Hi @Soreine! As per our conversation, here is the issue.

Essentially, lets say I add a block element to a new document which triggers the trailing block. All good so far. But if I delete that block level element, I’d expect to go back to an empty document (with no trailing block and only a placeholder). But today, the trailing block stays, thus preventing placeholder from being triggered.

It would be useful to have an option that normalizes (or not) document state, when it is empty. This is the logic that Slate uses to determine if something is empty, and should have placeholder triggered - https://github.com/ianstormtaylor/slate/blob/master/src/components/placeholder.js#L45-L57

Thank you!

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