5个用于对网页中的源代码进行着色的 WordPress 插件
jopen 13年前
<p>程序员的博客,贴代码是必不可少的,语法着色可以让代码看起来更养眼,下面是 5 个 WordPress 的插件,用来对代码进行语法高亮显示。</p> <h2>1) CodeColorer</h2> <p>该插件允许在写文章时插入代码,支持多种着色风格,支持多种编程语言。</p> <h4>使用方法:</h4> <p><img title="5个用于对网页中的源代码进行着色的 WordPress 插件" border="0" alt="5个用于对网页中的源代码进行着色的 WordPress 插件" src="https://simg.open-open.com/show/c5973783293b92b59bd6b891d23bdda3.jpg" width="600" height="121" /></p> <p><a title="Code Colorer" href="/misc/goto?guid=4958197556188287479" target="_blank">下载 CodeColorer 插件</a></p> <h2>2) WP-Syntax</h2> <p>该插件使用 GeSHi 进行语法着色,使用方法如下:</p> <div style="width:600px;white-space:nowrap;overflow:auto;" class="codecolorer-container html4strict railscasts"> <div class="html4strict codecolorer"> <span class="sc2"><pre class="brush:html; toolbar: true; auto-links: false;"><pre lang="LANGUAGE" line="1"> Code </pre> // PHP with No Line number <pre lang="php"> // PHP Code goies Here </pre> // Java with line number <pre lang="java" line="1"> // JAVA code goes here. </pre></pre></span> <span class="sc2"><br /> </span> </div> </div> <p><a title="WP Syntax" href="/misc/goto?guid=4958197557001050629" target="_blank">下载 WP-Syntax 插件</a></p> <h2>3) WP-Code</h2> <h4>使用方法</h4> <div style="width:600px;white-space:nowrap;overflow:auto;" class="codecolorer-container html4strict railscasts"> <div class="html4strict codecolorer"> <span class="sc2"><pre class="brush:html; toolbar: true; auto-links: false;"><code lang="LANGUAGE"> // Your code goes Here </code> </pre><br /> </span> </div> <div class="html4strict codecolorer"> <a title="WP Code" href="/misc/goto?guid=4958197557749977305" target="_blank">下载 WP-Code 插件</a> </div> </div> <h2>4) Crayon Syntax Highlighter</h2> <p>该插件支持多语言,不同风格、字体,可对 URL 地址进行高亮</p> <h4>使用方法:</h4> <div style="width:600px;white-space:nowrap;overflow:auto;" class="codecolorer-container html4strict railscasts"> <div class="html4strict codecolorer"> <pre class="brush:html; toolbar: true; auto-links: false;">[crayon lang="lang"] your code [/crayon] // where lang will be your language // highlight from URL [crayon url="http://example.com/codeblock.txt" /]</pre> </div> </div> <p><a title="Crayon Syntax Highlighter" href="/misc/goto?guid=4958197558476469792" target="_blank">下载该插件</a></p> <h2>5) WP Code Highlight</h2> <p>WP Code Highlight 提供简洁的语法高亮,兼容 W3C 验证</p> <h4>使用方法:</h4> <div style="width:600px;white-space:nowrap;overflow:auto;" class="codecolorer-container html4strict railscasts"> <div class="html4strict codecolorer"> <span class="sc2"><pre class="brush:html; toolbar: true; auto-links: false;"><pre> Your Code Block Here </pre></pre><br /> </span> </div> </div> <p><a title="WP Code Highlighter" href="/misc/goto?guid=4958197559220088254" target="_blank">下载插件 </a></p> <br /> <span style="font-weight:bold;">原文</span>: <a href="/misc/goto?guid=4958197559951623619" target="_blank">http://www.xpertdeveloper.com/2011/11/wordpress-highlight-code/</a>