我对TinyMCE有一个问题:
我需要得到这个代码:
<blockquote>
<h2>REVOLUTIONARY QUOTE RELATING MANIFESTO TO PROJECT GOES HERE</h2>
<hr/>
<p>Erik Heinsholt</p>
</blockquote>TinyMCE设置:
valid_elements: "a[href|target|title],ul,ol,li,br,strong/b,em/i,span[style<text-decoration: underline;|class],u,p,blockquote,hr,h2",
force_br_newlines: false,
force_p_newlines: true,
theme_advanced_buttons1: "undo,redo,|,bold,italic,underline,|,hr,code,preview, styleselect",
schema: "html5",
style_formats : [
{title : "First Word", inline : "span", classes : "first_word"},
{title : "Blockquote", block : "blockquote"},
{title : "Quote Header", inline : "h2"}
]我有:我在管理文本区域写“革命性的引用宣言到项目去这里”,然后选择“革命性的引用相关的宣言到项目去这里”,为它设置一个样式“引用标题”,然后选择全部并为它设置一个样式“<hr />”。结果我得到了这样的结果:
<blockquote><h2>REVOLUTIONARY QUOTE RELATING MANIFESTO TO PROJECT GOES HERE</h2></blockquote>
<blockquote><hr /></blockquote>
<blockquote><p>Erik Heinsholt</p></blockquote>我应该怎么做才能把所有元素放在一个块引用标签中,而不是每个元素??
附言:描述这个问题的视频:http://www.sendspace.com/file/nkz97d
发布于 2012-11-15 19:33:18
看看tinymce配置参数valid_elements和valid_children。您可以定义h2-和hr-tags可以是其他htmlnode的子节点。
https://stackoverflow.com/questions/13396572
复制相似问题