So I've associated a stylesheet to the RTE, created the link in there and then when I highlight the link and select the style from the format dropdown I actually end up with
It's a bit fragile and sometimes the class will be added to the anchor and sometimes it will be in span that's wrapping around the element. It's hard to fix I think.
However I tend to simply work around it using my css stating this
.blue,
.blue a{
color: blue;
}
Not always ideal, but it works and is far less time consuming that trying to fix the RTE behavior :)
Adding formats to anchor tags
Hi all,
I'm trying to add a class to hyperlinks in the RTE. What I want to end up with is
So I've associated a stylesheet to the RTE, created the link in there and then when I highlight the link and select the style from the format dropdown I actually end up with
So the RTE is injected a <span> and adding a class to that and not to the anchor.
Does anyone know how to stop this behaviour?
Thanks,
Craig
Hi Craig
It's a bit fragile and sometimes the class will be added to the anchor and sometimes it will be in span that's wrapping around the element. It's hard to fix I think.
However I tend to simply work around it using my css stating this
Not always ideal, but it works and is far less time consuming that trying to fix the RTE behavior :)
Hope this helps.
/Jan
Hi Jan,
That works!
Cool cheers matey.
is working on a reply...