我设计了一个内容管理系统,它使用 XML 文件作为其基础。除了 AddThis 的标记没有出现在 tinymce 编辑器中之外,一切都已完成并且运行良好。它甚至不会出现在 HTML 视图中。这没什么大不了的,除非用户编辑页面的那个部分,它会删除 addthis 控件。
有任何想法吗?
以下是标记在页面和 xml 文件中的显示方式:
<div style="float: left; margin-top: 1px; font-family: arial; color: #005396; margin-left: 3px; font-size: medium; margin-right: 200px;">Join Our Mailing List</div>
<div style="clear: right; float: right;">
<div style="text-align: center; margin-top: 8px; font-family: arial; clear: left; float: left; color: #333333; font-size: large; vertical-align: middle;">Check Out _ Weekly <br /><span style="font-family: arial; color: #005396; font-size: large;">National Polling Summary </span></div>
<div class="addthis_toolbox addthis_default_style addthis_32x32_style" style="float: right; padding-top: 15px;">
<a class="addthis_button_facebook"></a>
<a class="addthis_button_twitter"></a>
<a class="addthis_button_email"></a>
<a class="addthis_button_compact"></a>
</div>
</div>
这是在tinymce的HTML部分
<div style="float: left; margin-top: 1px; font-family: arial; color: #005396; margin- left: 3px; font-size: medium; margin-right: 200px;">Join Our Mailing List</div>
<div style="clear: right; float: right;">
<div style="text-align: center; margin-top: 8px; font-family: arial; clear: left; float: left; color: #333333; font-size: large; vertical-align: middle;">Check Out _ Weekly <br /><span style="font-family: arial; color: #005396; font-size: large;">National Polling Summary </span></div>
</div>
这是我的tinymce初始化:
tinyMCE.init({
// General options
mode: "textareas",
theme: "advanced",
plugins: "pagebreak,style,layer,table,save,advhr,advimage,advlink,emotions,iespell,insertdatetime,preview,media,searchreplace,print,contextmenu,paste,directionality,fullscreen,noneditable,visualchars,nonbreaking,xhtmlxtras,template,wordcount,advlist,autosave",
// Theme options
theme_advanced_buttons1: "save,newdocument,|,bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright,justifyfull,styleselect,formatselect,fontselect,fontsizeselect",
theme_advanced_buttons2: "cut,copy,paste,pastetext,pasteword,|,search,replace,|,bullist,numlist,|,outdent,indent,blockquote,|,undo,redo,|,link,unlink,anchor,image,cleanup,help,code,|,insertdate,inserttime,preview,|,forecolor,backcolor",
theme_advanced_buttons3: "tablecontrols,|,hr,removeformat,visualaid,|,sub,sup,|,charmap,emotions,iespell,media,advhr,|,print,|,ltr,rtl,|,fullscreen",
theme_advanced_buttons4: "insertlayer,moveforward,movebackward,absolute,|,styleprops,|,cite,abbr,acronym,del,ins,attribs,|,visualchars,nonbreaking,template,pagebreak,restoredraft",
theme_advanced_toolbar_location: "top",
theme_advanced_toolbar_align: "left",
theme_advanced_statusbar_location: "bottom",
theme_advanced_resizing: true,
relative_urls: false,
editor_deselector : "mceNoEditor",
// Example content CSS (should be your site CSS)
// using false to ensure that the default browser settings are used for best Accessibility
// ACCESSIBILITY SETTINGS
content_css: "Symba/Styles/CSS/Site.css",
// Use browser preferred colors for dialogs.
browser_preferred_colors: true,
detect_highcontrast: true,
// Drop lists for link/image/media/template dialogs
template_external_list_url: "lists/template_list.js",
external_link_list_url: "lists/link_list.js",
external_image_list_url: "lists/image_list.js",
media_external_list_url: "lists/media_list.js",
// Style formats
style_formats: [
{ title: 'Bold text', inline: 'b' },
{ title: 'Red text', inline: 'span', styles: { color: '#ff0000'} },
{ title: 'Red header', block: 'h1', styles: { color: '#ff0000'} },
{ title: 'Example 1', inline: 'span', classes: 'example1' },
{ title: 'Example 2', inline: 'span', classes: 'example2' },
{ title: 'Table styles' },
{ title: 'Table row 1', selector: 'tr', classes: 'tablerow1' }
],
// Replace values for the template plugin
template_replace_values: {
username: "Some User",
staffid: "991234"
}
});
更新
好的,我尝试将其添加到 init 函数中
valid_elements: "*[*]",
extended_valid_elements: "*[*]"
这使 div 回来了,但我仍然没有得到锚标签。