Tinymce 正在删除我的 img 结束标记并生成无效的 xhtml。
它变成了这个
<img src="image.jpg" />
进入这个
<img src="image.jpg" data-mce-src="/../Index/image.jpg">
我也在使用 codemagic,但是在查看 html 时它仍然显示 . 我也试过包括<img></img>
,但输出是一样的。
想法?
这是我的选择
var tinyMceOptions = {
mode: 'textareas',
theme: 'advanced',
element_format : "xhtml",
plugins: 'codemagic,wordcount,inlinepopups,sparkimage, sparklink',
theme_advanced_buttons1: 'formatselect,fontsizeselect,|, bold,italic,underline,|,bullist,numlist,|,outdent,indent,blockquote,|,forecolor,backcolor,|,justifyleft,justifycenter,justifyright,|,sub,sup,|,sparklink,sparkimage,codemagic',
theme_advanced_buttons2: '',
theme_advanced_buttons3: '',
theme_advanced_toolbar_location: 'top',
theme_advanced_toolbar_align: 'left',
theme_advanced_resizing: true,
theme_advanced_statusbar_location: "bottom",
valid_elements: "*[*]",
//extended_valid_elements :"script[language<javascript|type|src]",
skin: 'o2k7',
width: '575px',
height: '350px',
forced_root_block : false,
theme_advanced_blockformats: 'h1,h2,h3,h4,h5,h6,p',
relative_urls : false,
setup : function (ed) {
ed.onChange.add(function (ed, evt) {
var val = $('iframe#_contentAreaID_ifr').contents().find('body').html();
$('._hiddenContentContainer[data-contentid=' + currentTab + '] ._hiddenContentArea').val(val);
}
);
}
};