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

Issue pasting in shift-return line breaks from Google Docs #28342

Open
jeffpaul opened this issue Jan 20, 2021 · 3 comments
Open

Issue pasting in shift-return line breaks from Google Docs #28342

jeffpaul opened this issue Jan 20, 2021 · 3 comments
Assignees
Labels
[Feature] Paste [Type] Bug An existing feature does not function as intended

Comments

@jeffpaul
Copy link
Member

Description

I copied text from a Google Doc that has multiple lines that used shift-return instead of a normal carriage return / linebreak for some content (see just after the bold/italic "Summary" intro). When that was pasted into a brand new Post, it rendered oddly in the editor and on the frontend compared to how it looked in Google Docs. I tried to find an existing issue here and the closest I could find was #6132, but there's a lot going on in that issue and I'm only concerned with this "shift-return text paste issue" so here we are with a new issue. Apologies for the issue sprawl, but it's nice here so I'm going to make myself at home. streeeeeetch

Step-by-step reproduction instructions

See above, sorry too lazy to reformat those sentences into a numbered list though not so lazy that I won't type out this explanation of my laziness.

Expected behaviour

Text looks like it does in the linked Google Doc.

Actual behaviour

Gutenberg rendered the content oddly, see:
shift+return_odd-rendered-text

Screenshots or screen recording (optional)

See screenshot above.

Code snippet (optional)

n/a

WordPress information

  • WordPress version: 5.6
  • Gutenberg version: 9.7.4
  • Are all plugins except Gutenberg deactivated? Yes
  • Are you using a default theme (e.g. Twenty Twenty-One)? Yes, Twenty Twenty One 1.1

Device information

  • Device: Mac mini (2018)
  • Operating system: macOS Catalina (Version 10.15.7)
  • Browser: Firefox 84.0.2 (64-bit)
@talldan talldan added [Feature] Rich Text Related to the Rich Text component that allows developers to render a contenteditable Needs Testing Needs further testing to be confirmed. labels Jan 28, 2021
@talldan
Copy link
Contributor

talldan commented Jan 28, 2021

See above, sorry too lazy to reformat those sentences into a numbered list though not so lazy that I won't type out this explanation of my laziness.

@jeffpaul It's probably the most important bit though 😄

But granted your description is pretty much repro steps so I can forgive.

@carolinan
Copy link
Contributor

carolinan commented Apr 13, 2021

This is the result I get when I copy and paste the text from the doc to the post editor.
(Theme: Armando (FSE), Chrome, Windows 10)
image

And in the code editor:

<!-- wp:paragraph -->
<p><strong><em>Summary:&nbsp;</em></strong></p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p><strong><em>As the climate changes, global economic output will fall, but most of those economic damages can be avoided with smart policy.</em></strong></p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>For release to:<br>Web<br>Another line, no carriage return<br>Carrier pidgeon</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>As the President wrote this week in the journal

@talldan
Copy link
Contributor

talldan commented Apr 13, 2021

Hi @jeffpaul We had a look at this during a triage session in slack:
https://wordpress.slack.com/archives/C02QB2JS7/p1618293256296100

We had some mixed results. Most of us noticed that when copying all the text, it seems to work pretty well now.

But we were still able to reproduce the issue you had when copying and pasting part of the example content (https://wordpress.slack.com/archives/C02QB2JS7/p1618294526309300?thread_ts=1618293989.303300&cid=C02QB2JS7)

@getsource noticed:

If I copy and paste only part of the paragraph, I can reproduce

So, from “Summary” down to the middle of the example paragraph

If I go from “Summary” through the entire paragraph, it works.

@talldan talldan added [Type] Bug An existing feature does not function as intended [Feature] Paste and removed Needs Testing Needs further testing to be confirmed. [Feature] Rich Text Related to the Rich Text component that allows developers to render a contenteditable labels Apr 13, 2021
@ellatrix ellatrix self-assigned this May 21, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Paste [Type] Bug An existing feature does not function as intended
Projects
None yet
Development

No branches or pull requests

4 participants