Support #16284
closedCopy and pasting rendered HTML with into a block loses anchors
0%
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.
Updated by Raymond Hoh over 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.
Updated by Raffi Khatchadourian over 2 years ago
Actually, it's a normal block, not a custom HTML block.
Updated by Raffi Khatchadourian over 2 years ago
Actually, the "classic" block worked. Thanks! Somehow, the paragraph block is stripping HTML anchors.
Updated by Raymond Hoh over 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.