Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Paste: apply active formats when pasting inline #14815

Merged
merged 1 commit into from
Dec 11, 2019

Conversation

ellatrix
Copy link
Member

@ellatrix ellatrix commented Apr 4, 2019

Description

Fixes #11571. When pasting inline, we should merge the formats of the pasted record with the active formats, not just insert the value without the active formats. When you paste something inline in a rich text area, you'd expect it to preserve any active formats.

How has this been tested?

See #11571.

Screenshots

Types of changes

Bug fix.

Checklist:

  • My code is tested.
  • My code follows the WordPress code style.
  • My code follows the accessibility standards.
  • My code has proper inline documentation.
  • I've included developer documentation if appropriate.

@ellatrix ellatrix added [Feature] Rich Text Related to the Rich Text component that allows developers to render a contenteditable Good First Issue An issue that's suitable for someone looking to contribute for the first time labels Apr 4, 2019
@ellatrix ellatrix added this to the 5.5 (Gutenberg) milestone Apr 4, 2019
@ellatrix ellatrix requested a review from swissspidy April 4, 2019 08:43
@gziolo gziolo removed this from the 5.6 (Gutenberg) milestone May 6, 2019
@aduth
Copy link
Member

aduth commented May 22, 2019

Is this still valid?

@ellatrix
Copy link
Member Author

Yes

@ellatrix ellatrix added Good First Review A PR that's suitable for someone looking to contribute for the first time by reviewing code and removed Good First Issue An issue that's suitable for someone looking to contribute for the first time labels Jun 7, 2019
@youknowriad
Copy link
Contributor

I wanted to review this but it looks like it needs a rebase since the code changed a lot.

@ellatrix ellatrix changed the title RichText: Paste: merge active formats Paste: apply active formats when pasting inline Dec 11, 2019
@ellatrix ellatrix merged commit f92fed7 into master Dec 11, 2019
@ellatrix ellatrix deleted the fix/paste-active-formats branch December 11, 2019 16:15
@hypest
Copy link
Contributor

hypest commented Dec 16, 2019

Looks like onPaste adopted a new param (https://github.com/WordPress/gutenberg/pull/14815/files#diff-7839cf8eb81c9e32fb18ba285a50e027R125) but the PR is not updating the native mobile codepath to provide the param in the call sites, leading to crash.

@hypest
Copy link
Contributor

hypest commented Dec 17, 2019

PR is up to fix the regression: #19190

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Rich Text Related to the Rich Text component that allows developers to render a contenteditable Good First Review A PR that's suitable for someone looking to contribute for the first time by reviewing code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Insert Link: Pasting text removes link
6 participants