0

I am experiencing inconsistent color styling on <a> tags in the WordPress classic WYSIWYG editor.

If I highlight the text in the link, the editor wraps the inner text in a <span> but if I double click the text it wraps the entire a tag in a span.

Highlight result: <a href=""><span style="color: #f00">Link text</span></a>

Double click result: <span style="color: #f00"><a href="">Link text</a></span>

Example

Ideally what I'd want is the result to be: <a href="" style="color: #f00">Link text</a>

Any help/recommendations would be great!

  • You can add a CSS class for links to the TinyMCE as described here and stylize it on for front-end. Just pay attention to the TinyMCE version. – Max Yudin Jul 5 at 6:42

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.