WordPress.org

Make WordPress Core

Opened 5 months ago

Closed 6 days ago

Last modified 6 days ago

#50652 closed defect (bug) (reported-upstream)

Editing a link removes the existing CSS classes

Reported by: elgameel Owned by:
Milestone: Priority: normal
Severity: normal Version:
Component: Editor Keywords:
Focuses: Cc:

Description

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

Change History (2)

#1 @sabernhardt
6 days ago

  • Milestone Awaiting Review deleted
  • Resolution set to reported-upstream
  • Status changed from new to closed

@elgameel Thanks for the report!

I moved this to GitHub so the Editor team can fix the link attributes there:
https://github.com/WordPress/gutenberg/issues/27345

If you have anything to add, please comment on that issue.

#2 @elgameel
6 days ago

Ok, thanks @sabernhardt !

Note: See TracTickets for help on using tickets.