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);
}
);
}
};
解决方法:
这是TinyMCE代码本身的问题.
它从未打算与XHTML一起使用-如果您确实想将其与XHTML一起使用,则必须编辑核心.
Here is an article that might highlight how to use strict XHTML with TinyMCE
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。