[NOTE: This documentation has simply been copy-pasted from the HTML form and is NOT up to date, I recommend you
read that instead]
GeSHi Documentation
Version 1.0.7.22
Author: Nigel McNie, Benny Baumann
Copyright: © 2004 - 2007 Nigel McNie, 2007 - 2008 Benny Baumann
Email: nigel@geshi.org, BenBE@omorphia.de
GeSHi Website: http://qbnz.com/highlighter
This is the documentation for GeSHi - Generic Syntax Highlighter. The most modern version of this document is available on the web - go to http://qbnz.com/highlighter/documentation.php to view it.
Any comments, questions, confusing points? Please contact me! I need all the information I can get to make the use of GeSHi and everything related to it (including this documentation) a breeze.
Contents
* 1. Introduction
o 1.1 Features
o 1.2 About GeSHi
o 1.3 Credits
o 1.4 Feedback
* 2. The Basics
o 2.1 Getting GeSHi
o 2.2 Installing GeSHi
+ 2.2.1 Requirements
+ 2.2.2 Extracting GeSHi
+ 2.2.3 Installation
o 2.3 Basic Usage
* 3. Advanced Features
o 3.1 The Code Container
o 3.2 Line Numbers
+ 3.2.1 Enabling Line Numbers
+ 3.2.2 Styling Line Numbers
+ 3.2.3 Choosing a Start Number
o 3.3 Using CSS Classes
+ 3.3.1 Enabling CSS Classes
+ 3.3.2 Setting the CSS Class/ID
+ 3.3.3 Getting the Stylesheet
+ 3.3.4 Using an External Stylesheet
o 3.4 Changing Styles
+ 3.4.1 The Overall Styles
+ 3.4.2 Line Number Styles
+ 3.4.3 Setting Keyword Styles
+ 3.4.4 Setting Comment Styles
+ 3.4.5 Setting Other Styles
o 3.5 Case Sensitivity and Auto Casing
+ 3.5.1 Auto Caps/Nocaps
+ 3.5.2 Setting Case Sensitivity
o 3.6 Changing the Source/Language/Path/Charset
+ 3.6.1 Changing the Source Code
+ 3.6.2 Changing the Language
+ 3.6.3 Changing the Path
+ 3.6.4 Changing the Character Set
+ 3.6.5 Using load_from_file to change the language and source code
o 3.7 Error Handling
o 3.8 Disabling Styling of Some Lexics
o 3.9 Setting the Tab Width
o 3.10 Using Strict Mode
o 3.11 Adding/Removing Keywords
+ 3.11.1 Adding a Keyword
+ 3.11.2 Removing a Keyword
+ 3.11.3 Adding a Keyword Group
+ 3.11.4 Removing a Keyword Group
o 3.12 Headers and Footers for your code
+ 3.12.1 Keyword Substitution
+ 3.12.2 Setting Header Content
+ 3.12.3 Setting Footer Content
+ 3.12.4 Styling Header Content
+ 3.12.5 Styling Footer Content
o 3.13 Keyword URLs
+ 3.13.1 Setting a URL for a Keyword Group
+ 3.13.2 Disabling URLs for a Keyword Group
+ 3.13.3 Disabling all URLs for Keywords
+ 3.13.4 Styling Links
+ 3.13.5 Setting the Link Target
o 3.14 Using Contextual Importance
o 3.15 Highlighting Special Lines "Extra"
+ Specifying the Lines to Highlight Extra
+ Styles for the Highlighted Lines
o 3.16 Adding IDs to Each Line
o 3.17 Getting the Time of Styling
* 4 Language Files
o 4.1 An Example Language File
o 4.2 Language File Conventions
o 4.3 Language File Sections
+ 4.3.1 The Header
+ 4.3.2 The First Indices
+ 4.3.3 Keywords
+ 4.3.4 Symbols and Case Sensitivity
+ 4.3.5 Styles for your Language Files
+ 4.3.6 URLs for Functions
+ 4.3.7 Object Orientation Support
+ 4.3.8 Using Regular Expressions
+ 4.3.9 Contextual Highlighting and Strict Mode
+ 4.3.10 Tidying Up
* 5 Method/Constant Reference
1: Introduction
Top | Contents | Next | Previous
GeSHi is exactly what the acronym stands for: a Generic Syntax Highlighter. As long as you have a language file for almost any computer language - whether it be a scripting language, object orientated, markup or anything in between - GeSHi can highlight it! GeSHi is extremely customisable - the same source can be highlighted multiple times in multiple ways - the same source even with a different language. GeSHi outputs XHTML strict compliant code*, and can make use of CSS to save on the amount of output. And what is the cost for all of this? You need PHP. That's all!
*Most of the time. Some languages do not output XHTML strict code, and using line numbers with the PRE header is not legal either. These problems will be fixed in 1.2.
1.1: Features
Top | Contents | Next | Previous
Here are some of the standout features of GeSHi:
* Programmed in PHP: GeSHi is coded entirely in PHP. This means that where ever you have PHP, you can have GeSHi! Almost any free webhost supports PHP, and GeSHi works fine with PHP > 4.3.0*.
* Support for many languages: GeSHi comes with about 100 languages, including PHP, HTML, CSS, Java, C, Lisp, XML, Perl, Python, ASM and many more!
* XHTML compliant output: GeSHi produces XHTML compliant output, using stylesheets, so you need not worry about GeSHi ruining your claims to perfection in the standards department ;)
* Highly customisable: GeSHi allows you to change the style of the output on the fly, use CSS classes or not, use an external stylesheet or not, use line numbering, change the case of output keywords... the list goes on and on!
* Flexible: Unfortunately, GeSHi is quite load/time intensive for large blocks of code. However, you want speed? Turn off any features you don't like, pre-make a stylesheet and use CSS classes to reduce the amount of output and more - it's easy to strike a balance that suits you.
This is just a taste of what you get with GeSHi - the best syntax highlighter for the web in the world!
*Support is granted for PHP 4.3.0 and above, but especially 4.3.x cannot be guaranteed to work due to a lack of test systems. If you are forced to use such old PHP versions complain at your hoster or contact us if you find compatibility issues so we can try to resolve them. It's only PHP 4.4.X and above that is verified to work.
1.2: About GeSHi
Top | Contents | Next | Previous
GeSHi started as a mod for the phpBB forum system, to enable highlighting of more languages than the available (which can be roughly estimated to exactly 0 ;)). However, it quickly spawned into an entire project on its own. But now it has been released, work continues on a mod for phpBB* - and hopefully for many forum systems, blogs and other web-based systems.
*I am no longer working on this MOD, however if someone else wants to they can contact me for more information.
Several systems are using GeSHi now, including:
* Dokuwiki - An advanced wiki engine
* gtk.php.net - Their manual uses GeSHi for syntax highlighting
* WordPress - A powerful blogging system*
* PHP-Fusion - A constantly evovling CMS
* SQL Manager - A Postgres DBAL
* Mambo - A popular open source CMS
* MediaWiki - A leader in Wikis*
* TikiWiki - A megapowerful Wiki/CMS
* TikiPro - Another powerful Wiki based on Tikiwiki
* RWeb - A site-building tool
* Available as plugin only. In addition, some of the other entries mentioned here may only have GeSHi available as a plugin.
GeSHi is the original work of Nigel McNie. The project was later handed over to Benny Baumann. Others have helped with aspects of GeSHi also, they're mentioned in the THANKS file.
1.3: Credits
Top | Contents | Next | Previous
Many people have helped out wit
没有合适的资源?快使用搜索试试~ 我知道了~
资源推荐
资源详情
资源评论
收起资源包目录
ckeditor带注释源码 未压缩 非压缩 (2000个子文件)
samples.css 64KB
dialog.css 22KB
dialog.css 22KB
dialog.css 17KB
toolbar.css 10KB
richcombo.css 10KB
toolbar.css 9KB
codemirror.css 8KB
toolbar.css 7KB
panel.css 6KB
stylesheet.css 6KB
panel.css 5KB
panel.css 5KB
mainui.css 5KB
menu.css 5KB
mainui.css 5KB
richcombo.css 5KB
menu.css 5KB
menu.css 5KB
balloonpanel.css 5KB
sample.css 5KB
notification.css 5KB
mainui.css 4KB
notification.css 4KB
notification.css 4KB
richcombo.css 4KB
colorpanel.css 4KB
balloonpanel.css 4KB
balloonpanel.css 4KB
editor_iequirks.css 4KB
editor_ie7.css 3KB
colorpanel.css 3KB
colorpanel.css 3KB
editor_ie7.css 3KB
contents.css 3KB
default.css 3KB
railscasts.css 2KB
console.css 2KB
reset.css 2KB
reset.css 2KB
reset.css 2KB
arta.css 2KB
monokai_sublime.css 2KB
obsidian.css 2KB
xcode.css 2KB
sunburst.css 2KB
dialog_iequirks.css 2KB
googlecode.css 2KB
monokai.css 2KB
school_book.css 2KB
editor.css 2KB
editor.css 2KB
editor.css 2KB
outputxhtml.css 2KB
magula.css 2KB
elementspath.css 2KB
far.css 2KB
zenburn.css 2KB
editor_ie.css 2KB
brown_paper.css 2KB
docco.css 2KB
atelier-lakeside.light.css 2KB
atelier-lakeside.dark.css 2KB
atelier-seaside.light.css 2KB
dark.css 2KB
atelier-seaside.dark.css 2KB
atelier-forest.light.css 2KB
atelier-forest.dark.css 2KB
atelier-heath.light.css 2KB
elementspath.css 2KB
atelier-heath.dark.css 2KB
idea.css 2KB
atelier-dune.light.css 2KB
atelier-dune.dark.css 2KB
fontello.css 2KB
dialog_ie7.css 2KB
github.css 2KB
editor_ie.css 2KB
editor_ie.css 2KB
pojoaque.css 2KB
tomorrow-night-blue.css 2KB
solarized_light.css 2KB
solarized_dark.css 2KB
tomorrow-night.css 2KB
dialog_ie.css 2KB
dialog_ie.css 2KB
rainbow.css 2KB
foundation.css 2KB
elementspath.css 2KB
vs.css 2KB
editor_ie8.css 2KB
tomorrow-night-eighties.css 2KB
tomorrow-night-bright.css 1KB
editor_iequirks.css 1KB
editor_iequirks.css 1KB
paraiso.light.css 1KB
paraiso.dark.css 1KB
templates.css 1KB
ir_black.css 1KB
copyformatting.css 1KB
共 2000 条
- 1
- 2
- 3
- 4
- 5
- 6
- 20
资源评论
- y4301242019-09-05ckeditor.js 是压缩版
- too-young2018-03-29好用,可以的
aahappy
- 粉丝: 0
- 资源: 4
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功