Project

General

Profile

Actions

Support #16284

closed

Copy and pasting rendered HTML with into a block loses anchors

Added by Raffi Khatchadourian almost 2 years ago. Updated almost 2 years ago.

Status:
Resolved
Priority name:
Normal
Assignee:
-
Category name:
-
Target version:
Start date:
2022-06-22
Due date:
% Done:

0%

Estimated time:
Deployment actions:

Description

If you copy and paste rendered HTML (e.g., from Chrome) into a block (in the block editor) and the HTML has anchors, when the rendered HTML is converted to block, the anchors disappear. The anchors don't disappear in the classic editor.

Actions #1

Updated by Raymond Hoh almost 2 years ago

Hi Raffi,

Looks like this is a block editor bug: https://github.com/WordPress/gutenberg/issues/35962.

Not much we can do here. Some support threads I've read recommend using the Classic block to paste your contents into. I'm not sure if that is a suitable workaround though.

Actions #2

Updated by Raffi Khatchadourian almost 2 years ago

Actually, it's a normal block, not a custom HTML block.

Actions #3

Updated by Raffi Khatchadourian almost 2 years ago

Note "rendered" HTML.

Actions #4

Updated by Raffi Khatchadourian almost 2 years ago

Actually, the "classic" block worked. Thanks! Somehow, the paragraph block is stripping HTML anchors.

Actions #5

Updated by Raymond Hoh almost 2 years ago

  • Tracker changed from Bug to Support
  • Status changed from New to Resolved
  • Target version set to Not tracked

Glad the Classic block was able to work, Raffi.

For some additional testing, in Chrome, I tried selecting some text and links from a Wikipedia entry. Next, I copied and pasted that into the Block Editor (not using the Classic block) and the anchor links were able to render correctly, both in the preview and after the post was published.

Perhaps the copy-and-paste problem occurs on specific websites. If you want, you can post an issue over on the Gutenberg Github repo or on the wordpress.org support forums to see if they will be able to look at it. Make sure to include the URL and content you were trying to copy-and-paste.

For now, I will mark this as resolved.

Actions

Also available in: Atom PDF