TinyMCE删除<pre><code>

时间:2015-08-15 07:23:17

标签: python django tinymce mezzanine

I'm creating a site using Mezzanine CMS / Django which utilizes TinyMCE as its text editor and I am having trouble with the combination of <pre> and <code> tags.

When I drop code into a <pre>...</pre> block all of my line breaks work. For example:

.nav {
    display:block;
}

However, when I include the <code> tag (<pre><code>...</code></pre>) all line breaks are removed and the code ends up like this:

.nav { display:block; } 

This makes including readable code snippets very difficult. I have been going through all of the different configuration options on TinyMCE's docs but can't seem to find anything that works.

0 个答案:

没有答案