开发者

How do I allow a self closing tag in TinyMCE?

The source tags inside my video element need to be self closing so the iPad doesn't start whinging.

I type in <source src="myVideo.m4v" />

TinyMCE keeps changing it to <sourc开发者_JS百科e src="myVideo.m4v" ></source> though.

How can I tell it to stop?


Have a look at valid_elements and extended_valid_elements.

EDIT:

You may use the closed setting in your tinymce init:

closed : /^(br|hr|input|meta|img|link|param|area)$/, // default

to

closed: /^(br|hr|input|meta|img|link|param|area|source)$/,

If this does not work then i think you might additionaly need to change one line of code from the tinymce core code located in Editor.js on line 2666 (newest tiny mce version) and extend the setting there with your source tag.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜