WordPress Editor: Writing Code

When creating posts using WordPress, I often switch between the Visual and HTML editors. I write a lot of code in my posts (using the pre tag and the CodeBox plugin).

Unfortunately, when I switch back to the Visual editor, WordPress changes my code. Although, the code is wrapped in a pre tag, the visual editor will still change or remove code. For instance, If I add ‘ < script > ‘ to my page, I had to resort to writing < script >, so the visual editor does not change it.

It recently occurred to me that if I create a post with a lot of code, rather than trying to trick the Visual editor, I remain in the HTML editor and never switch back into the Visual editor before I publish.

I hope this helps someone else writing code using WordPress.

Be Sociable, Share!

Checkout My New Site - T-shirts For Geeks