Skip to content

Trim trailing block on save #5185

@danielbachhuber

Description

@danielbachhuber

Issue Overview

As a Gutenberg user, it's not obvious that the trailing default block needs to be removed in order to not be saved with the post content. I'd expect that my stored post content only represent the content I've produced.

Steps to Reproduce (for bugs)

  1. Create a new post.
  2. Write a few paragraphs.
  3. Unintentionally leave the last block trailing in the post.

Expected Behavior

When saving a post, I'd suggest the last block be removed if it's an empty paragraph block.

Current Behavior

The last empty paragraph block is left in my post content.

Screenshots / Video

image


image

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions