Unexpected effect when displaying HTML code blocks

Continuing the discussion from Display code blocks:
The solution combining FixedPre and Fred’s TinyMCE works, except for one thing. HTML tags are not displayed. If you again open the TinyMCE code editor, the code is in fact there, and using the browser’s element inspector also shows the code. Logging out of Fred and viewing the page also displays the code as expected.

This isn’t a complete disaster, since you can open TinyMCE’s code browser, but it’s still rather alarming to see the blank code block.

Another rather annoying “feature” is that TinyMCE keeps adding line breaks, every time you open the code editor it’ll add another line break.

I’m also not wildly in love with it arbitrarily adding the slash to end the single-tag elements.

No, I’m sorry, but this is not working. Some code is still causing a 500 server error when using the “Preview” view, and TinyMCE is putting in line breaks wherever it thinks they should be.

<div id="logo" class="container">[[++site_name]]
<ul class="social-icons">
<li><a class="icon flip" href="http://www.facebook.com/blog.cssjuntion">^</a></li>
<li><a class="icon" href="http://sottwell.sottwell.modxcloud.com/">T</a></li>
<li><a class="icon" href="http://www.twitter.com/susanottwell">^</a></li>


</ul>


[[!pdoMenu? 
  &parents=`+0` 
  &level=`1` 
  &outerTpl=`@CODE:
<ul role="navigation">[[+wrapper]]</ul>

`
]]
</div> 

And CSS styling is sometimes being applied in the Fred element block, making it really impossible to use in many cases.

I see that ContentBlocks has a built-in code editing block that uses Prism. Actually, I’m a little surprised that Fred doesn’t support code blocks out-of-the-box. That’s a pretty common requirement in our business. You can’t write articles and tutorials without it.