Crayon Syntax Highlighter is a perfect highlight code solution for any wordpress site. It ‘s fast, simple and easy to use. Syntax Highlighter supporting multiple languages, themes, fonts, highlighting from a URL, local file or post text.
First of all, you can download and install here: https://wordpress.org/plugins/crayon-syntax-highlighter/
A Syntax Highlighter built in PHP and jQuery that supports customizable languages and themes. It can highlight from a URL, a local file or WordPress post text. Crayon makes it easy to manage Language files and define custom language elements with regular expressions. It also supports some neat features like:
- Integrated Theme Editor!
- Tag Editor in both Visual & HTML editors
- Toggled plain code
- Toggled line numbers
- Copy/paste code
- Open code in a new window (popup)
- Line wrapping
- Code expanding
- Minimizing
- bbPress 2 support
- Converting legacy code in blog posts/comments to <pre>
- Remote request caching
- Mixed Language Highlighting in a single Crayon
- Mini Tags like [php][/php]
- Inline Tags floating in sentences
- Crayons in comments
- `Backquotes` become code
- pre tag support, option to use setting-value in the class attribute
- Valid HTML 5 markup
- Visual & HTML editor compatible
- Mobile/touchscreen device detection
- Mouse event interaction (showing plain code on double click, toolbar on mouseover)
- Tab sizes
- Code title
- Toggled toolbar
- Retina buttons
- Striped lines
- Line marking (for important lines)
- Line ranges (showing only parts of the code)
- Starting line number (default is 1)
- Local directory to search for local files
- File extension detection
- Live Preview in settings
- Dimensions, margins, alignment, font-size, line-height, float
- Extensive error logging
The code highlight is very easy to use in back end with the toobar icon and window
And the highlight code will be display in front end like this
It ‘s famous choice what almost wordpress guy should use. I think the best feature on them is the icon toolbar what help user save time everytime they want to add highlight code. Others you have to use shortcode what is not easy to remember 🙂
Actually, the key thing from this plugin is it work well in editor UI. Other choice with shortcode will mess up the editor so it ‘s difficult to see the overral look when we create a new post.