Skip to content

Give feedback when pasted content is not allowed in a block. #12094

@Sjardo

Description

@Sjardo

Is your feature request related to a problem? Please describe.
When you paste a code-snippet into Gutenberg's paragraph block, I notice that it did not do anything. Checking the console for any error's or my part, but everything seemed to work fine! After asking around, this seemed to be intentionally.

Yet, for a user to paste content (a code-snippet or anything else) that is not allowed in a certain block, should give feedback on the screen. Otherwise, users could think it's broken or did something wrong. This gives a bad user experience.

Describe the solution you'd like
The best UX, in this case, should be a notification with a clear message what is happening. If the content the user pastes is not valid for the block, give out a notification that it's not allowed.

Describe alternatives you've considered
In my eyes the best solution would be to paste the content as text (rework any symbols to ASCII code if that's possible) and set out the warning that GB detected content that's probably better suited for the other block and give an option to switch to the other block.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions