Describe the problem... I am using tinymce in a proprietary CMS. I want to display code examples on a web page. I am using "pre" and "code" tags. Strangely, tinymce moves my code example out of the tags and puts it below the now empty "pre"/"code" tags. Or it is closing tags when it doesn't need to. Any insight into why tinymce is doing this would be greatly appreciated.
Actually, as I am typing this up, it occurs to me that possibly tinymce thinks that it needs to close the beginning and ending tags and is not actually moving anything.
Where I have searched... I have searched extensively and cannot find any examples of tinymce moving code out of tags or trying to close tags when not needed.
I did run across some responses that indicated that tinymce was not auto-closing tags, but that there was invalid html and the browser was doing the auto-closing. however, it looks to me like I have written valid html.
Show the code... Here is my code that I used to test this. keep in mind I am using a proprietary CMS.
<pre><code>
<div class="pblk25">
<p>blarg</p>
</div>
</code></pre>
I had initially used angle brackets for my example, but read that was supposed to used named entities to keep the example from being processed and displayed by the browser. Nevertheless - the result is the same each way.
Show expected and actual results... My expected result on the webpage is
<div class="pblk25">
<p>blarg</p>
</div>
The actual result when doing "view source" is
<pre><code></code></pre>
<div class="pblk25">
<p>blarg</p>
</div>
<pre><code>
</code></pre>
Notice on the first line the appearance of </code></pre>. And on the next to last line the appearance of <pre<>code>.
Which is then displayed on the web page as
blarg
Thank you for your kind assistance with this puzzling situation.