I have a requirement to produce mark up like the following for an image within the SDL Tridion Rich text editor:
<div class="imagemasksmall">
<img src="tcm:2-123-16" alt="My amazing image" />
</div>
My initial thought was to use the FormatAreaStyles.css file to add a class like div.imagemasksmall { }
, however this only seems to be available if I add the div in the mark up.
Is there a way to allow an editor to produce the above markup without having to write the code manually?
If all you need is a DIV with the "imagemasksmall" class and an image inside, you can do that in 3 steps (as you have already added the style to FormatAreaStyles.css):
If you want to reduce the number of manual steps needed for it, you will probably have to write an extension that does those steps for the user.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With