Retain empty lines in a RichText field I am using a RichText field type of my site content and I am inserting blocks of code within some &lt;pre&gt; tags which I add in the HTML view of the editor, however when I leave the HTML view, all of the empty lines within the &lt;pre&gt; block are stripped out.

I've tried turning off the clean up HTML option etc with no luck. Is there a way to keep the empty lines (multiple consecutive newlines).
Don't use Redactor / a Rich Text field for code blocks is probably the only answer one can give right now.

Instead you could use a Plain Text field for your article and get the formatting done with markdown. Or you could use Matrix and keep using Redactor for the text parts of your article and have a separate block type for code.