TinyMCE adds styles on save
Hello: I'm using tinyMCE, copying from word and dropping the text into the editor. When I save it once it works as it should and gives me this formating:
<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>
But when I go to the same page, and hit save again, I get this code
<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: "Cambria","serif"; mso-fareast-font-family: "Times New Roman"; mso-bidi-font-family: Arial; color: #4f81bd;">Course Description:</span></strong><strong><span style="font-size: 18.0pt; font-family: "Arial","sans-serif"; mso-fareast-font-family: "Times New Roman"; color: #7d7d7d;"></span></strong></p>
You are seeing extra formatting because you are pasting from MS Word. Use the clear formatting option in Word or use a plain text editor, such as notepad, that won't add any extra formatting when you paste.
for me,I had same issue, my add post had
$_POST = array_map( 'stripslashes', $_POST );
my edit page did not, I added it and it was fine. so compare your add & edit pages, the may differ.
精彩评论