Manually added link attributes are stripped when editing URL or toggling Open in new tab #27345
Labels
[Feature] Link Editing
Link components (LinkControl, URLInput) and integrations (RichText link formatting)
[Feature] Rich Text
Related to the Rich Text component that allows developers to render a contenteditable
[Type] Bug
An existing feature does not function as intended
Original report by elgameel
https://core.trac.wordpress.org/ticket/50652
When we manually add a CSS class to a link in the editor, editing the link again removes the class tag.
For example, if we try to edit this link:
<a href="https://example.com" class="btn">test link</a>
The class tag will be removed, and it will look like this:
<a href="https://example.com">test link</a>
Here's a video that explains the problem: https://i.rankmath.com/wtZycO
To reproduce
a
tag. Preferably this would change the link's style within the editor.Expected behavior
Manual attributes remain on the link tag, even when one of the standard attributes is edited in the visual mode.
Versions
The text was updated successfully, but these errors were encountered: