Skip to content

Raw handling: Pasting from Google Doc doesn't recognize Markdown formatted code #32917

Open

Description

@zdenys

Description

Markdown formatting is not recognized when copied from a Google Document and pasted into the Editor. This applies to inline code and multiline code (confirmed from my testing so far), but could be actually all of the Markdown formatting. Possibly related issue: #29833

Step-by-step reproduction instructions

  1. Copy the following text and paste it into the Editor

Inline code like this `code goes here` is not recognized.

```
Code is not recognized
```

  1. The Editor recognizes the code and transforms it accordingly:

Screen Capture on 2021-06-23 at 12-34-14

  1. Copy the same text from step 1. and paste it into a Google Document
  2. Copy the text from Google Document and paste it into the Editor

Expected behaviour

See the same result as in step 2 where the Editor recognizes the inline code and the code and transforms it accordingly.

Actual behaviour

The Editor leaves single quotes as they are and doesn't recognize the inline code or the multiline code

Screenshots or screen recording (optional)

Gutenberg.Google.Doc.Mrkdown.formatting.not.recognized.mov

WordPress information

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

Device information

  • Device: MacBook Pro (16-inch, 2019)
  • Operating system: macOS Big Sur 11.4
  • Browser: Chrome 91

Activity

  1. andrewserong commented on May 10, 2023

    @andrewserong
    Contributor

    Just going through and re-testing a few older issues that haven't had comments.

    Re-testing this now, it still appears that this issue is at play. If I copy and paste the raw version of the text markup from a text editor into the editor then it works, however it doesn't when copy / pasting from Google Docs.

  2. changed the title [-]Pasting from Google Document doesn't recognize Markdown formatted code[/-] [+]Raw handling: Pasting from Google Doc doesn't recognize Markdown formatted code[/+] on Aug 3, 2023
  3. moved this to Needs Dev / Todo in WordPress 6.4 Editor Taskson Aug 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions