一款优秀的 WordPress 代码格式、高亮插件

如果你还在为WP难以处理代码格式、高亮而大动肝火,那么我建议你试试 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. The result is source code formatted and highlighted the way you intended.

This plugin was originally written for use with EmacsBlog. To see it in action, scroll through this particular post or visit the screenshots.

Usage, Supported Languages, Styling Guidelines, and Release Notes are availabe in the Other Notes section.

Basic Usage

Wrap code blocks with <pre lang="LANGUAGE" line="1"> and </pre> where LANGUAGE is a GeSHi supported language syntax. The line attribute is optional. More usage examples

7 thoughts on “一款优秀的 WordPress 代码格式、高亮插件”

  1. ihipop :

    黑孩儿 :

    ihipop :
    您有好的wp替代编辑器推荐么?

    没有,我认为默认的就可以了,我从来不用所见即所得。其实只需要 preview 一下就可以了。

    我用惯了discuz的编辑器了,有点不习惯,哈哈

Leave a Reply

Your email address will not be published. Required fields are marked *