Source code shortcode only works from text view
-
I just discovered and love the shortcode that allows me to post code on my blog. However, I found that ASCII symbols and characters in my code snippets, such as < and “, post as their HTML nicknames if I am using the “Visual” editor when I press “Preview” or “Publish”:
<h3><a id="whatBarn"></a>What the Barn Owl Saw</h3>turns into
<h3><a id="whatBarn"></a>What the Barn Owl Saw</h3>I can toggle this behavior on/off by clicking between “text” and “visual” on the WordPress post editor.
I’d love to be able to post code with syntax highlighting and custom line numbering, but at the moment the rendering is giving me second thoughts. Any ideas?
Screenshot1, taken of a post that I posted when WP editor was in “visual” view.
Screenshot2, taken of the same post (no typing input whatsoever) that I posted when WP editor was in “text” view.
Thanks,
-Artie at YBR
The blog I need help with is: (visible only to logged in users)
-
ETA: Predictably, the code I pasted above rendered the “right” way both times, even when I was trying to show the “wrong” way. Please see the screenshots for a clear example of what I’m talking about.
- The topic ‘Source code shortcode only works from text view’ is closed to new replies.