I am trying use TinyMCE to get code syntax to be displayed in the <pre><code> tag that will render highlighted syntax referencing css and javascript downloaded from https://github.com/isagalaev/highlight.js.
What I hope to achieve was to create a plugin to insert the <pre><code> tags to contain the codes user posts. While I manage to create the plugin, the <br/> tags was not represented after I have posted the codes. Meaning that the submitted codes are shown as a one-liner, which is not desirable.
What I’m trying to find out is how do I maintain the <br/> tags within the codes I have posted.
Using the Tinymce’s default HTML code plugin, if I just simply encapsulate <pre><code> tags around the codes user posts, it also does not render the <br/> tag.
I would greatly appreciate any help or pointers to this issue. Many Thanks!
If you trying to render the string
<br/>, don’t forget you need to encode it as<br/>(Are there still people who write
<br/>instead of just<br>? Wow.)