I am really frustrated with availible Syntax Highlighter’s on the market it seems that no matter which one I use, after pressing “Save Draft” or “Publish” and after I change from Visual to Html or reverse I am loosing the xml snippet code. Also, other code (C#, PHP) just loosing their style, especially break lines making code unreadable. My configuration is
- WordPress 3.2.1.
- Easy Google Syntax Highlighter,
- SyntaxHighlighter TinyMCE Button,
- SyntaxHighlighter
I really like WordPress however writing and espessially editing posts in admin panel, which is very handfull, make it impossible because it just looses and stripping code formating.
So, the question is which plugins do you use or do you write posts through admin panel?
2 Answers
Your best bet is to use custom post meta to store the code, and output it however you want. In other words, skirt the editor entirely. Here’s a really clever WP theme by Dan Cederholm that does this like a champ.