Skip to content

Fixes pasting in heading blocks.#675

Merged
diegoreymendez merged 7 commits intodevelopfrom
issue/624-fix-pasting-in-header
Mar 5, 2019
Merged

Fixes pasting in heading blocks.#675
diegoreymendez merged 7 commits intodevelopfrom
issue/624-fix-pasting-in-header

Conversation

@diegoreymendez
Copy link
Copy Markdown
Contributor

@diegoreymendez diegoreymendez commented Feb 26, 2019

Description:

Fixes pasting in header blocks, when the paste operation would result in a block split.

Details:

In order to achieve this I copied the splitting code from the paragraph block into the heading block.

There's a chance to unify code there, but I have purposely not stepped into that, as we would need to make sure all blocks that use rich text can use the same code (title?), or find a solution that would let us customize it for some blocks (this is probably what we'd want to do).

Related PRs:

Gutenberg PR: WordPress/gutenberg#14118

Testing:

  1. Copy two paragraphs of text.
  2. Paste them into a header block.

@diegoreymendez diegoreymendez added the [Type] Bug Something isn't working label Feb 26, 2019
@diegoreymendez diegoreymendez added this to the Beta milestone Feb 26, 2019
@diegoreymendez diegoreymendez self-assigned this Feb 26, 2019
Copy link
Copy Markdown
Contributor

@SergioEstevao SergioEstevao left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is working great on iOS.

@daniloercoli
Copy link
Copy Markdown
Contributor

Sorry @diegoreymendez if the review process took so long.
I've left a comment in the companion PR, since there seems to be a small issue (easy to fix).

@diegoreymendez
Copy link
Copy Markdown
Contributor Author

@daniloercoli - No worries!

This is ready for another look.

Copy link
Copy Markdown
Contributor

@daniloercoli daniloercoli left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Works as expected!

Copy link
Copy Markdown
Contributor

@daniloercoli daniloercoli left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@diegoreymendez diegoreymendez merged commit eed51b6 into develop Mar 5, 2019
@diegoreymendez diegoreymendez deleted the issue/624-fix-pasting-in-header branch March 5, 2019 17:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

[Type] Bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants