WordPress 代码高亮插件-WP Syntax

代码高亮的插件接触过两款,一款 Coolcode,另一款就是 WP Syntax,最终还是选择了安装 WP Syntax。这是是一款超强的 WordPress 代码高亮插件,支持 phpjavaperl、xmlasp 等 136 种脚本语言.

介绍一下 WP Syntax 的使用方法

基本应用格式

<pre lang="Language" Line="1"> 和</pre>

lang-语言类型,常用的有 asp,css,javascript,mysql,php,sql,xml
line-是否显示行号,不写则默认

示例:CSS

`.a {font-size:12pt;}`

附一:WP-Syntax 支持的语言

abap, actionscript, actionscript3, ada, apache, applescript, aptsources, asm,asp, autoit,bash, blitzbasic, bnf, boo,c, cmac, caddcl, cadlisp, cil, cfdg, cfm, cobol, cpp-qt,cpp,csharp,css, d, delphi, diff, div, dos, dot, eiffel, fortran, freebasic, genero, gettext, glsl, gml, bnuplot, groovy, haskell,html4strict, idl, ini, inno, io,java,java5,javascript, kixtart, klonec, klonecpp, latex, lisp, lotusformulas, lotusscript, lua, m68k, matlab, mirc, mpasm, mxml,mysql, nsis,objc, ocaml-brief, ocaml, oobas,oracle8, pascal, per, pic16,perl, php-brief,php, plsql, povray, powershell, progress,python, qbasic,rails, reg, robots,ruby, sas, scala, scheme, sdlbasic, smalltalk, smarty,sql, tcl, text, thinbasic, tsql, typoscript,vb,vbnet, verilog, vhdl, visualfoxpro, winbatch,xml, xorg_conf, xpp, z80

WP-Syntax 支持的语言:abap, actionscript, actionscript3, ada, apache, applescript, aptsources, asm,asp, autoit,bash, blitzbasic, bnf, boo,c, cmac, caddcl, cadlisp, cil, cfdg, cfm, cobol, cpp-qt,cpp,csharp,css, d, delphi, diff, div, dos, dot, eiffel, fortran, freebasic, genero, gettext, glsl, gml, bnuplot, groovy, haskell,html4strict, idl, ini, inno, io,java,java5,javascript, kixtart, klonec, klonecpp, latex, lisp, lotusformulas, lotusscript, lua, m68k, matlab, mirc, mpasm, mxml,mysql, nsis,objc, ocaml-brief, ocaml, oobas,oracle8, pascal, per, pic16,perl, php-brief,php, plsql, povray, powershell, progress,python, qbasic,rails, reg, robots,ruby, sas, scala, scheme, sdlbasic, smalltalk, smarty,sql, tcl, text, thinbasic, tsql, typoscript,vb,vbnet, verilog, vhdl, visualfoxpro, winbatch,xml, xorg_conf, xpp, z80

分享到以下媒体:

留下评论