【发布时间】:2014-12-24 21:11:23
【问题描述】:
有没有办法在没有样式和保留语义的情况下将格式化文本粘贴到ckeditor?
例如这是它粘贴的内容:
<h1 style="font-family: sans-serif; color: rgb(34, 34, 34); line-height: 18.2000007629395px;">An h1 header</h1>
<p style="color: rgb(34, 34, 34); font-family: sans-serif; font-size: small; line-height: 18.2000007629395px;">Paragraphs are separated by a blank line.</p>
<p style="color: rgb(34, 34, 34); font-family: sans-serif; font-size: small; line-height: 18.2000007629395px;">2nd paragraph. <em>Italic</em>, <strong>bold</strong>, and <code style="white-space: pre; background-color: rgb(238, 238, 238);">monospace</code>. Itemized lists look like:</p>
<ul style="color: rgb(34, 34, 34); font-family: sans-serif; font-size: small; line-height: 18.2000007629395px;">
<li>this one</li>
<li>that one</li>
<li>the other one</li>
</ul>
但我想粘贴这个:
<h1>An h1 header</h1>
<p>Paragraphs are separated by a blank line.</p>
<p>2nd paragraph. <em>Italic</em>, <strong>bold</strong>, and <code>monospace</code>. Itemized lists look like:</p>
<ul>
<li>this one</li>
<li>that one</li>
<li>the other one</li>
</ul>
【问题讨论】: