源码网商城,靠谱的源码在线交易网站 我的订单 购物车 帮助

源码网商城

FCKeditor 和 SyntaxHighlighter 代码高亮插件的整合

  • 时间:2020-06-29 23:29 编辑: 来源: 阅读:
  • 扫一扫,手机访问
摘要:FCKeditor 和 SyntaxHighlighter 代码高亮插件的整合
[h2]Introduction(简介)[/h2] This is a dialog-based plugin to handle formatting of source code for [url=http://www.fckeditor.net/]FCKeditor 2.5.x[/url]. It WON'T work with the new [url=http://ckeditor.com/]CKEditor[/url] (yet).(CKEditor 是FCKEditor 的升级版,不过,[b]SyntaxHighlighter 还不能在 CKEditor 中实现代码高亮[/b]) It makes use of the[b]SyntaxHighlighter 2.0.x[/b] javascript library available to download from [url=http://alexgorbatchev.com/wiki/SyntaxHighlighter]Alex Gorbatchev's[/url] project page (the older version[b]1.5.1 version[/b] is available from [url=http://code.google.com/p/syntaxhighlighter/]Google Code[/url]). The plugin primiarily edits a[b]<pre>[/b] tag with some custom attributes. Its mainly aimed at users editing blogs or content management systems where there is a requirement to format programming languages on a website that is being edited using FCKEditor. [i]The plugin will not format the code in FCKEditor[/i] - the SyntaxHighlighter javascript library dynamically generates a lot of formatted HTML at runtime, which would cause problems in FCKEditor. [h3]Skip straight to the good bits[/h3] Can't be bothered reading all this? [url=http://psykoptic.com/demo/syntaxhighlighter2/default.aspx]View the online demo[/url] or [url=http://psykoptic.com/blog/post/2008/12/01/Code-Syntax-Highlight-Plugin-for-FCKeditor.aspx#download]download the plugin[/url] and go play with it yourself. [h3]So what do I get then?[/h3] Correctly installed, the plugin is in the form of a tabbed dialogue box that looks like this:(插件安装好以后的效果) [img]http://pic002.cnblogs.com/img/catprayer/201004/2010042420004541.png[/img]

[url=http://psykoptic.com/userfiles/files/FCKEditor-syntaxhighlight_2.1.0.zip]Download[/url] | [url=http://psykoptic.com/demo/syntaxhighlighter2/default.aspx]Demo[/url]   [*][b]v2.0.1[/b] [22 March 2009] Minor bug fix where semi-colons were sometimes positioned in the wrong place when no advanced options were selected [url=http://psykoptic.com/userfiles/files/FCKEditor-syntaxhighlight_2.0.1.zip]Download[/url]   [/*][*][b]v2.0[/b] [2 March 2009] Latest version supporting SyntaxHighlighter 2.0.x   [/*][*][b]v1.0.2[/b] [2 March 2009] Bug fixes, final release supporting the older SyntaxHighlighter 1.5.1 Note the instructions below are for the newer version of the library and makes references to [i]syntaxhighlight2 [/i]a lot, this version uses [i]syntaxhighlight[/i]. The documentation in the download will be more accurate. [url=http://psykoptic.com/userfiles/files/FCKEditor-syntaxhighlight_1.0.2.zip]Download[/url].| [url=http://psykoptic.com/demo/syntaxhighlighter/default.aspx]Demo[/url]   [/*][*][b]v1.0.1[/b] [10 Feb 2009].   [/*][*][b]v1.0[/b] [30 Nov 2008]. First version. [/*][/list]

[url=http://alexgorbatchev.com/wiki/SyntaxHighlighter]Alex Gorbatchev's site[/url] has loads of excellent information (he wrote it after all!), for the old version 1.5.1 library, the [url=http://code.google.com/p/syntaxhighlighter/w/list]project wiki here[/url] is a good resouce, or [url=http://www.icelab.eu/en/blog/javascript-and-ajax-8/how-to-highlight-the-syntax-by-syntaxhighlighter-53.htm]this blog[/url] post might also be useful. [h2]5. Use it[/h2] Now[b]clear your browser cache [/b](this stage is important!) and reload the editor, the new button [img]http://files.jb51.net/upload/201004/20100425202917268.gif[/img] should be ready to use. [h2]6. Future updates[/h2] There's some additional functionality I might add at a later date: [list] [*]Preview tab using the SyntaxHighlighter library [/*][*]More configuration options, eg, available languages, path to SyntaxHighlighter files [/*][*]Dynamically adding a[b]<pre>[/b] formatting style to the editor by default [/*][/list] [h2]7. And finally...[/h2] Thanks goes to Alex Gorbatchev for creating [url=http://alexgorbatchev.com/]Syntax Highlighter[/url]!. 编程素材网打包下载地址: [url=http://xiazai.jb51.net/201004/yuanma/FCKEditor-syntaxhighlight.rar]/201004/yuanma/FCKEditor-syntaxhighlight.rar[/url] 

  • 全部评论(0)
联系客服
客服电话:
400-000-3129
微信版

扫一扫进微信版
返回顶部