'Convert link to mention' overwrites the Header link title and anchor link

  1. When clicking the ‘copy link to clipboard’ icon next to a header in rich text
  2. Paste it somewhere (e.g. at the top of the rich text field to create a custom TOC)
  3. Hover the link and click ‘Mention’ in the link menu.
  4. The link and title of the link are converted to the entity title and link. This is unexpected behavior.

Desired behavior: The created Mention link to show the header text and keep the header link.

Related bug