1

您好:我正在使用 tinyMCE,从 word 中复制并将文本放入编辑器。当我保存它时,它应该可以正常工作并给我这种格式:

<p class="MsoNormal" style="margin: 0in 0in 10pt;"><span style="line-height: 115%; color: #0f243e; font-size: 12pt; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin; mso-themecolor: text2; mso-themeshade: 128;"><span style="font-family: Calibri;">Course Description:</span></span></p>                                                         

但是当我转到同一页面并再次点击保存时,我得到了这段代码

<span style="line-height: 18px;">

<p class="MsoNormal" style="margin-bottom: .0001pt; line-height: normal; mso-outline-level: 2;"><strong><span style="font-size: 13.5pt; font-family: &quot;Cambria&quot;,&quot;serif&quot;; mso-fareast-font-family: &quot;Times New Roman&quot;; mso-bidi-font-family: Arial; color: #4f81bd;">Course Description:</span></strong><strong><span style="font-size: 18.0pt; font-family: &quot;Arial&quot;,&quot;sans-serif&quot;; mso-fareast-font-family: &quot;Times New Roman&quot;; color: #7d7d7d;"></span></strong></p>
4

2 回答 2

1

您会看到额外的格式,因为您是从 MS Word 粘贴的。使用 Word 中的清除格式选项或使用纯文本编辑器(如记事本),在粘贴时不会添加任何额外的格式。

于 2012-07-25T10:28:56.950 回答
-1

对我来说,我有同样的问题,我的添加帖子有

$_POST = array_map( 'stripslashes', $_POST );

我的编辑页面没有,我添加了它,它很好。所以比较您的添加和编辑页面,可能会有所不同。

于 2015-12-19T03:39:25.323 回答