12款最佳的 WordPress 语法高亮插件推荐

  语法高亮工具增强了代码的可读性,美化了代码,让程序员更容易维护。语法高亮提供各种方式由以提高可读性和文本语境,尤其是对于其中可以结束跨越多个页面的代码,以及让开发者自己的程序中查找错误。在这篇文章中,我们选择了12款最佳的 WordPress 语法高亮插件分享给大家,这将有助于你管理,美化和突出你的代码。

您可能感兴趣的相关文章

 

1. Crayon Syntax Highlighter

crayon

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.

2. Advanced Code Editor

advanced code editor
Enables syntax highlighting in the integrated themes and plugins source code editors. Supports PHP, HTML, CSS and JS. Effectively edit your themes or plugins when you only have access to a browser, by enabling syntax highlighting in WordPress integrated source code editors. Supports PHP, HTML, CSS and JavaScript.

3. WP Code Highlight

wp code highlight
WP Code Highlight provides syntax highlighting of source code snippets and it is W3C valid. Wrap code blocks with and it provides a code button(HTML editor) to help you insert code in articles easily. You don’t need to specify the language since WP Code Highlight will guess, all languages are supported. You can put line numbers in your code if you need.

4. WP Syntax

wp syntax
WP-Syntax provides clean syntax highlighting using GeSHi supporting a wide range of popular languages. It supports highlighting with or without line numbers and maintains formatting while copying snippets of code from the browser. It avoids conflicts with other 3rd party plugins by running an early pre-filter and a late post-filter that substitutes and pulls the code snippets out first and then pushes them back in with highlighting at the end.

5. IG: Syntax Hiliter

ig syntax hiliter
iG:Syntax Hiliter allows you to post source code to your site with syntax highlighting and formatting (as seen in code editors, IDEs). You can paste the code as is from your code editor or IDE and this plugin will take care of all the code colouring and preserve your formatting. It uses the GeSHi library to colourize your code and supports over a 100 programming languages. Most common languages are included with the plugin and it includes drop in support for more languages used by GeSHi.

6. Syntax Highlighter Compress

syntax highlighter compress
Syntax Highlighter ComPress is a simple WordPress plugin, that is based on the latestAlex Gorbatchev’s SyntaxHighlighter Script. Code and source text of different mark-up or programming languages can be highlighted in WordPress. Supported mark-up or programming are: AppleScript, ActionScript3, Bash/shell, Coldfusion, C#, C++, CSS, Delphi, Diff, Erlang, Groovy, JavaScript, Java, JavaFX, Perl, PHP, Plain Text, Python, Ruby, Scala, SQL, Visual Basic and XML.

7. Code Highlight

code highlight
This plugin uses the Google Code Prettify Script to Highlight & Style Code. The plugin also adds styling to the existing pre Quick tag in your WordPress text editor, no shortcodes which look bad if you stop using the plugin.

8. Dev Formatter

dev formatter
Create a better display of codes on your page/blog. For everybody that publish examples, source-code and some tips about a specific language. This plugin do use of GeSHi highlight system, so you will have support for more then 110 languages, including PHP, ASP, Html, JavaScript, CSS, Java, Python, Delphi, C++, C, Visual Basic and much more.

9. Syntax Highlighter Evolved

syntax highlighter evolved
SyntaxHighlighter Evolved allows you to easily post syntax-highlighted code to your site without losing it’s formatting or making any manual changes. It uses the SyntaxHighlighter JavaScript package by Alex Gorbatchev.

10. Syntax Highlighter MT

syntax highlighter mt
This plugin works like many of the others that enable the use of the Syntax Highlighter tool. Dynamic plugin loading is now available as part of the Syntax Highlighter tool, making brush configuration obsolete.

11. PCSH – PastaCode and Syntax Highlighter

pcsh
With PCSH (based on the Pastacode plugin), you can easily add code into your posts with the awesome SyntaxHighlighter js-library. You can insert source code into the post editor, from a file, or from webservices like GitHub, Gist, Pastebin or BitBucket. Webservices responses are cached in order to avoid too many HTTP requests.

12. Smart Syntax

smart syntax
Smart Syntax plugin automatically adds Google prettify syntax highlighting to the fenced code blocks in both content and comments. It’s made with Jetpack markdown in mind, which brings the power of markdown extra to WordPress and gives you an easy to use markdown syntax for fenced code blocks.

 

您可能感兴趣的相关文章

 

本文链接:12款最佳的 WordPress 语法高亮插件推荐

编译来源:梦想天空 ◆ 关注前端开发技术 ◆ 分享网页设计资源

作者:山边小溪
主站:yyyweb.com 记住啦:)
欢迎任何形式的转载,但请务必注明出处。

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
写在前面 用WordPress以来,本站一直是用CodeColorer来实现代码高亮,但原版的汉化不够完全,且与不少主题都冲突,因此本人将原版修改过后使用,并加入了可视化代码插入功能,之前也想发布出来,但因为懒,一直推迟到现在,既然大家希望我提供下载,因此我把它打包出来提供给大家。 CodeColorer CodeColorer是一基于GeSHi库的WordPress代码语法高亮插件。功能简单,使用方便,是一比较轻量的插件。CodeColorer支持[cc lang="lang"]code[/cc]和code两种语法。 属性说明 属性列表如下,括号内是参数类型.string是字符串;integer是整数;boolean是布尔型(开关),可接受“true” “false”, “on” “off”, 整数 1 or 0. lang (string) – 代码使用的语言。 tab_size (integer) – 用以替换制表符的空格数,可在设置界面更改。 line_numbers (boolean) – 是否显示行号,可在设置界面更改。 first_line (integer) – 指定代码块第一行的行号 highlight (string) – 用于指定整行高亮代码行行数,参数是用半角逗号分隔的数字串(如 1,5,8,9)。 no_links (boolean) – 当值为false时,关键字将会添加一个到官方文档的链接,可在设置界面更改。 lines (integer) –指定代码块显示的行数,当值设置为-1时,不出现纵向滚动条,可在设置界面更改。 width (integer or string) – 代码块宽度,可在设置界面更改。 height (integer or string) – 代码块高度,当这个高度可显示的行数比lines指定的值大才会生效,可在设置界面更改。 rss_width (integer or string) – 代码块在RSS输出时的宽度,可在设置界面更改。 theme (string) – 代码块颜色风格 (default, blackboard, dawn, mac-classic, twitlight, vibrant),可在设置界面更改。 inline (boolean) – 内嵌模式开关,用于将一行代码插入到文本中。 strict (boolean) – 严格模式的开关。 nowrap (boolean) – 当值指定为false时,过长的行将会被自动换行,以避免出现横向滚动条。 noborder (boolean) – 是否显示边框的开关。 no_cc (boolean) – 当值为true时,code标签将会被解析,但代码块不会有格式。 class (string) – 添加一个新的CSS。 escaped (string) – 当值为false,代码块里的html转义字符不会被转义,如<不会转义为<,默认为false。 What's New? 添加可视化代码插入按钮并汉化界面; 可视化代码插入界面添加Java,CSS两种语言; 兼容官方主题及各种自定义主题; 修复不自动换行时行号显示不正确的问题; 优化高亮代码显示方式,放弃Table布局,改用Div+CSS,兼容多种浏览器乃至IE6; 添加代码工具栏,实现一键复制等功能,同样兼容多种浏览器。 等待你们去发现…… 我的博客: http://lanfei.sinaapp.com/ http://blog.csdn.net/CooLanfei 欢迎访问交流。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值