• I’m trying to write code in my blog posts, but none of the editors I will let me. For example, if I try to do

    <pre>
      <html>
        <body>
          hello world
        </body>
      </html>
    </pre>

    It gets converted to this:

    <pre>
    </pre>
      <html>
        <body>
          hello world
        </body>
      </html>

    whenever I go back to the visual editor. So my code isn’t between pre tags anymore. Same thing happens for <code> tags. Does this happen to anyone else? I’ve tried this with the default editor, TinyMCE Advanced, and CKEditor and all of them do this.

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘Writing code in blog posts’ is closed to new replies.