[wp-trac] [WordPress Trac] #47705: Gutenberg: Copy/Paste does not copy internal links href="#ID" as-is but replaces them with links to admin-side

WordPress Trac noreply at wordpress.org
Mon Jul 15 15:07:29 UTC 2019


#47705: Gutenberg: Copy/Paste does not copy internal links href="#ID" as-is but
replaces them with links to admin-side
--------------------------+-----------------------------
 Reporter:  e467gj6x      |      Owner:  (none)
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  General       |    Version:  5.2.2
 Severity:  normal        |   Keywords:
  Focuses:                |
--------------------------+-----------------------------
 Gutenberg editor interprets internal hyperlinks when copy/pasting. Not
 good.

 I wrote a blog post with a table of contents, several chapters, and
 return-to-TOC -links. Something like this:

 <h2 id="toc">Table of contents</h2>
 <a href="#chapter1">Chapter 1</a>
 <a href="#chapter2">Chapter 2</a>

 ...

 <h2 id="chapter1">Chapter 1</a>
 Really important stuff here, really.
 <a href="#toc">Return to table of contents</a>

 Now, If I ever need to EDIT this page and I copy/paste any of these links
 in the editor, then #chapter1 is no longer #chapter1 but an explicit link
 to the admin-interface. And #toc is no longet #toc but an explicit link.

 Those explicit links work as long as I stay logged in, but when the world
 (my friends probably) accesses my writings, there will be no page-internal
 links but instead references to the admin side.

 I want #ref to stay #ref, explicitly, when copy/pasting.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/47705>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list