1
這裏是插件的配置。TinyMCE不允許將div塊放入標記
theme: "modern",
toolbar: "link, image, styleselect, formatselect forecolor backcolor | bold,italic,underline | bullist,numlist,outdent,indent | undo,redo | pastetext,pasteword,selectall | code fullscreen",
pagebreak_separator: "<p class='page-separator'> </p>",
plugins: 'link image code fullscreen wordcount textcolor',
relative_urls: false,
remove_script_host: false,
image_caption: true,
cleanup_on_startup: false,
trim_span_elements: false,
verify_html: false,
cleanup: false,
convert_urls: false,
valid_elements: '*[*]',
valid_children: '*[*]',
allow_html_in_named_anchor: true,
allow_unsafe_link_target: true,
force_br_newlines: false,
force_p_newlines: false,
forced_root_block: '',
document_base_url: (!window.location.origin ? window.location.protocol + "//" + window.location.host : window.location.origin) + "/"
所以,我想要做的就是把背景圖像的div塊放入標籤。你可以看到,我實現了一些選項來禁止源代碼的驗證,但是tinymce仍然在編輯我的代碼。什麼,我需要 例子:
<a href="http://mosplitka.ru/uploads/Cersaie/cersaie_17.jpg" data-gallery="cersaie">
<div class="page-gallery-item-bg" style="background-image:url('http://mosplitka.ru/uploads/Cersaie/medium_cersaie_17.jpg'); ">
</div>
</a>
<div class="page-gallery-item-bg" style="background-image: url('http://mosplitka.ru/uploads/Cersaie/medium_cersaie_17.jpg');"> </div>
<a href="http://mosplitka.ru/uploads/Cersaie/cersaie_17.jpg" data-gallery="cersaie"> </a>