开发者

TinyMCE + html5 figure, img & figcaption plugin/insertion

开发者 https://www.devze.com 2023-01-30 00:32 出处:网络
I\'m looking for a best 开发者_如何学Cpractice approach to achieving a plugin in TinyMCE, to implement insertion of the HTML5 element <figure>, along one or more child <img>s, and a <fi

I'm looking for a best 开发者_如何学Cpractice 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.


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


Try this:

http://www.tinymce.com/forum/viewtopic.php?id=29615

It is a small modification of the image plugin so that it uses figure/figcaption when it is the case. It was never used in production, but should work.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号