Search code examples
htmltinymcedjango-tinymce

TinyMCE + html5 figure, img & figcaption plugin/insertion


I'm looking for a best practice approach to achieving a plugin in TinyMCE, to implement insertion of the HTML5 element <figure>, along one or more child <img>s, and a <figcaption>.

Whilst the HTML5 spec seems to allow for other figure types, i.e. other than <img>, that's all we're concerned with at the moment.

Ideally, the solution would be plugin based and portable.

FYI we're using TinyMCE w/ Django.


Solution

  • You will need to use the extended_valid_elements setting to configure your elements as valid elements and define valid children.