2
votes

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.

1

1 Answers

0
votes

After doing some more research it seems that I was using an older version of Mezzanine (3) which uses an older version of TinyMCE. This issue seems to have been resolved in the latest release of TinyMCE which is used by Mezzanine 4.

The resolution was to just upgrade Mezzanine.