FCKeditor is reformatting my HTML code, but is doing so in a completely incorrect way.
For example, let's say I have FCKeditor installed on a news site where authors are entering story copy. Now, let's say I want to float a box on the right of my article. Assuming I have "div" defined in the "ProtectedTags" directive, I click on Source and hand enter the following...
Saving the article, and reloading the editor, I see that FCKeditor has mangled the hell out of my code as follows:
So my question is how do I stop FCKeditor from doing this? It's treating a div tag as if it were a formatting tag, not a peer to a p-tag. I'm about to revert to a year-old version of the editor that doesn't do this atrocious reformatting.
Thanks in advance.
-Steve
For example, let's say I have FCKeditor installed on a news site where authors are entering story copy. Now, let's say I want to float a box on the right of my article. Assuming I have "div" defined in the "ProtectedTags" directive, I click on Source and hand enter the following...
<p>Some text before</p> <div class="floatBox"> <h2>Some heading</h2> <p>Some text that someone would be interested in.</p> </div> <p>Some text after</p>
Saving the article, and reloading the editor, I see that FCKeditor has mangled the hell out of my code as follows:
<p>Some text before</p> <p> <div class="floatBox"> </div> </p> <h2>Some heading</h2> <p>Some text that someone would be interested in.</p> <p>Some text after</p>
So my question is how do I stop FCKeditor from doing this? It's treating a div tag as if it were a formatting tag, not a peer to a p-tag. I'm about to revert to a year-old version of the editor that doesn't do this atrocious reformatting.
Thanks in advance.
-Steve

Re: FCKeditor is butchering my code
Second: change FCKConfig.Entermode = 'p' to FCKConfig.Entermode = 'br'. This stops the embedding into a paragraph-tag...