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!
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.
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.
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