Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

Anyone know of a plugin that adds syntax highlighting to the post/page HTML editor?

Thanks-

share|improve this question

closed as off topic by toscho Nov 4 '12 at 3:28

Questions on WordPress Development Stack Exchange are expected to relate to WordPress within the scope defined by the community. Consider editing the question or leaving comments for improvement if you believe the question can be reworded to fit within the scope. Read more about reopening questions here.If this question can be reworded to fit the rules in the help center, please edit the question.

    
it is not a straight questions. Try google first. –  Hans Zimermann Jul 17 '11 at 21:53
    
@Hans- I tried google, did you? What don't you understand about the question? –  Yarin Jul 17 '11 at 21:54
1  
Just to clarify what you're asking(because it appears everyone is reading the question different to how i am).. You're looking for a syntax highlighter for the post editor, not the theme/plugin editor, would that be correct? –  t31os Jul 18 '11 at 11:23

5 Answers 5

I've used Power Code Editor in the past it has syntax highlighting. It's been awhile since I've used it, but it seemed to work fine then.

share|improve this answer

I am using SyntaxHighlighter Evolved by Viper007Bond, works great! http://wordpress.org/extend/plugins/syntaxhighlighter/

After I gave this answer yesterday, I read a recent post by Konstantin Kovshenin over at theme.fm, which gives you all the different possibilities on how to add syntax into your Posts/Pages: http://theme.fm/2011/07/working-with-code-in-wordpress-posts-985/

share|improve this answer

I found a shortcode by @Bainternet in Ohad Raz weblog that can help you to build your sintax highlight own plugin, or just type it into your functions.php file theme.

function bainternet_highlight($atts, $content = null) {
extract(shortcode_atts(array(
    'color' => 'yellow',
    'font' => '#000000'
  ), $atts));
  return "<FONT style=\"BACKGROUND-COLOR: $color; color: $font\">$content</font>";
}
add_shortcode('highlight','bainternet_highlight');

Usage: [ highlight ] this text is highlighted [/highlight]

Now, if you are searching for a MCE syntax highlightter, the best plugin I have found is the Advanced code Editor

Hope that helped with your question.

share|improve this answer

I was looking forever for the solution. I finally found this plugin which actually does a lot of things. But i only used the option to add a HTML button to the row of buttons which lets you edit post/page html with CodeMirror highlighting.

share|improve this answer

This one could solve the problem http://wordpress.org/extend/plugins/html-editor-syntax-highlighter/

share|improve this answer
1  
Please read meta.stackexchange.com/a/104231/145551 and stop copying the same answer. –  toscho Apr 19 '12 at 14:00
    
What the hell.. This is the ACTUAL answer this guy is looking for, and it gets downvoted. Meanwhile all of the other answers that were upvoted are totally unrelated to the guy's question... –  AgmLauncher Mar 18 at 20:12

Not the answer you're looking for? Browse other questions tagged or ask your own question.