I have searched high and low for the answer to this simple question.
How the heck do I prevent CKEditor from reformatting the HTML code in my post?
I just want my page to display a snippet of HTML code. I have tried wrapping it in <code></code> and also in <pre></pre>, but the editor moves these markers around after I save the file. For example, if I wrap the following code in <pre></pre>, then CKEditor reformats and the </pre> is automatically moved just after the <pre>. How do I keep the </pre> and </code>, for that matter, where they are? Thanks.
I am using Wordpress 3.2.1 and CKeditor v3.6.2
<pre>
<div class="itembox">
<div class="itembox-header">
<h2 style="padding-left:40px;"><?php echo SPEC($GLOBALS['_LANG']['_tpl_add7']) ?></h2>
</div>
<div class="itemboxinner"><code><code> </code></code></div>
</div>
</div>
</pre> <------ this is moved to the position just after the <pre> above.
How the heck do I prevent CKEditor from reformatting the HTML code in my post?
I just want my page to display a snippet of HTML code. I have tried wrapping it in <code></code> and also in <pre></pre>, but the editor moves these markers around after I save the file. For example, if I wrap the following code in <pre></pre>, then CKEditor reformats and the </pre> is automatically moved just after the <pre>. How do I keep the </pre> and </code>, for that matter, where they are? Thanks.
I am using Wordpress 3.2.1 and CKeditor v3.6.2
<pre>
<div class="itembox">
<div class="itembox-header">
<h2 style="padding-left:40px;"><?php echo SPEC($GLOBALS['_LANG']['_tpl_add7']) ?></h2>
</div>
<div class="itemboxinner"><code><code> </code></code></div>
</div>
</div>
</pre> <------ this is moved to the position just after the <pre> above.

Re: </pre> is moved when using it with HTML snippets
http://wordpress.org/extend/plugins/ckeditor-for-wordpress/
Re: </pre> is moved when using it with HTML snippets
Also, I already have the following PHP filter stuff in ckeditor.config.js. It is the default (and unchanged) file that came with Wordpress CKeditor v3.6.2.
config.protectedSource.push(/<\?[\s\S]*?\?>/g);
I just want to be able to show the HTML code snippet as I mentioned before, in my post.
Or any code for that matter. What do I need to do in order to do that?
Thanks.
Re: </pre> is moved when using it with HTML snippets
after small research I found a small bug in plugin (unnecessary strip & entity ) . There will be a fix for this in next release. Thx for notice this and please be patient.
Re: </pre> is moved when using it with HTML snippets
Is there a workaround for this? How do I prevent all formatting of HTML code in between <pre> and </pre>?
Thanks
Re: </pre> is moved when using it with HTML snippets
New release should be shipped soon , so please be patient.
you know, i see this post is
you know, i see this post is almost two years old and I have the same problem with the latest version of ckeditor 3. I just updated it as a test and its still doing it.
For anyone else who
For anyone else who encounters this issue:
http://ckeditor.com/forums/CKEditor/Need-Help-CKEditor-is-deleting-my-xml-tags-and-adding-p-tags
Using the configs posted here works with the most up to date version 3. I believe it is config.entities = false in particular