PHP下的FCKEditor代码高亮插件UGeSHi
明晨网络MingchenNet.com的内容管理系统是DEDECMS。发布文章时经常涉及程序源代码,为了便于发布后查看,要选择一款使用方便、兼容性强的代码高亮插件。尝试了好几种插件,最终选定了UGeSHi,其官方下载地址http://www.phplamp.org/2008/11/fckeditor-fck-geshi-ugeshi-highlight-plugin/ 。
先看看UGeSHi能够高亮多少种语言吧:
| abap | actionscript | actionscript3 | ada | apache |
| applescript | apt_sources | asm | asp | autoit |
| avisynth | bash | basic4gl | blitzbasic | bnf |
| boo | c | caddcl | cadlisp | cfdg |
| cfm | cil | cobol | cpp-qt | cpp |
| csharp | css | c_mac | d | delphi |
| diff | div | dos | dot | eiffel |
| fortran | freebasic | genero | gettext | |
| glsl | gml | gnuplot | groovy | haskell |
| html | html4strict | idl | ini | inno |
| io | java | java5 | javascript | kixtart |
| klonec | klonecpp | latex | lisp | lotusformulas |
| lotusscript | lua | m68k | make | matlab |
| mirc | mpasm | mxml | mysql | nsis |
| objc | ocaml-brief | ocaml | oobas | oracle11 |
| oracle8 | pascal | per | perl | php-brief |
| php | pic16 | plsql | povray | powershell |
| progress | prolog | python | qbasic | rails |
| reg | robots | ruby | sas | scala |
| scheme | scilab | sdlbasic | smalltalk | smarty |
| sql | tcl | teraterm | text | thinbasic |
| tsql | typoscript | vb | vbnet | verilog |
| vhdl | visualfoxpro | winbatch | xml | xorg_conf |
| xpp | z80 |
太全了,官方给出的使用方法:
1.下载并解压后,将ugeshi文件夹存放于fckeditor/editor/plugins/目录下;
2. 编辑fckconfig.js文件,添加 FCKConfig.Plugins.Add('ugeshi', "zh-cn');
3. 设置FCKEditor工具栏,FCKConfig.ToolbarSets["Default"]值中添加:UGeSHi (大写)
清空浏览器临时文件,再次进入后台使用fckeditor编辑器就可以看到效果了。
明晨网络提供的下载链接http://www.box.net/shared/alagtekme2
文章源自:明晨网络,明晨网络原创,《PHP下的FCKEditor代码高亮插件UGeSHi》,http://www.mingchennet.com/tec/code/php/1.htm
- 上一篇:没有了
- 下一篇:PHP下的使用fetion飞信免费发送sms短信的接口、函