So what I've created is a few styles that can be applied using the formats dropdown in the RTE. All is well and works ok but 95% of the time the class that needs be applied is blueLink and I was wondering if there's any way to apply this class automatically when the user initially creates the link negating the need to select the respective class as it will have already been applied?
Wouldn't that be to simply just make the default anchor color inside a rich text editor always be blue? And then the editor will only add classes to those that should be colored differently?
Say you wrap you rich text editor content in a div with the class rte-content. Like this
HTML
<div class="rte-content">
<a href="#">I don't have a class - I'm just a standard link</a>
<a href="#" class="redLink">Uuuh! Look at me! I'm a red link - I'm soooo beyond standard.</a>
</div>
Thanks for your response I did think of that but the problem is the design team (who are external) are constantly changing the CSS themselves and I'm concerned that any changes I make to the base CSS will get overwritten on the next update hence the request to try and change the behavior of the RTE.
Add a default class when anchors are created in the RTE
Hi folks,
I'm integrating a design into Umbraco and the designers have specified a few classes that should be applied to anchors
So what I've created is a few styles that can be applied using the formats dropdown in the RTE. All is well and works ok but 95% of the time the class that needs be applied is blueLink and I was wondering if there's any way to apply this class automatically when the user initially creates the link negating the need to select the respective class as it will have already been applied?
Thanks,
Craig
Hi Craig
Wouldn't that be to simply just make the default anchor color inside a rich text editor always be blue? And then the editor will only add classes to those that should be colored differently?
Say you wrap you rich text editor content in a div with the class rte-content. Like this
HTML
CSS
Is this approach useful and does it make sense in your context?
/Jan
Hi Jan,
Thanks for your response I did think of that but the problem is the design team (who are external) are constantly changing the CSS themselves and I'm concerned that any changes I make to the base CSS will get overwritten on the next update hence the request to try and change the behavior of the RTE.
Craig
Hi Craig
But won't that be a risk no matter the approach you take?
/Jan
Actually you're probably right!
Sorted!
is working on a reply...