Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Extend rich-text editor (Tridion 2011 SP1)

Tags:

tridion

Is it possible to extend the rich-text editor to add and other HTML5 elements? Can the items in the Section Type drop-down list be added to perhaps?

Cheers

Edit

Thanks for the input, I opted for an approach that leveraged the Format Area stylesheet by adding a new style in p.Blockquote {}, we then look for <p class="Blockquote"> and replace it with actual <blockquote> tags via our application. Simples!

like image 558
Neil Avatar asked Apr 02 '12 15:04

Neil


Video Answer


2 Answers

Neil,

The file TcmXHTML.Config contains a list of HTML 5 tags that the RTE will support. You can add tags to this list, but do it at your own risk.

I know you can customize the Styles drop-down (using FormatArea.css) but not sure about the Section Type.

like image 193
Nuno Linhares Avatar answered Sep 22 '22 09:09

Nuno Linhares


It is possible to extend the rich-text editor for sure, although depending on what you want to do it sometimes requires you to rebuild some of it (which isn't extending but more the hacking type of solution which we don't want ;). Especially the Section type drop-down, that information seems to come from somewhere deep down. The fact that it doesn't have HTML5 elements is related to the HTML5 document type not being available either I think.

To add HTML5 elements I think its easier if you add a button to the rich-text editor toolbar and use that for your HTML5 elements (keep in mind the accessibility level support cannot be used then anymore, as we are missing the HTML5 doctype currently). You will have to build a complete extension behind that button, so its not going to be trivial, but I think it has a better success rate than trying to add them to the existing drop-down.

In any case, I would also recommend you enter HTML5 support for the rich-text field as an idea at http://ideas.sdltridion.com/ so it can be considered for a future release.

like image 31
Bart Koopman Avatar answered Sep 25 '22 09:09

Bart Koopman