Extension:CodeMirror/zh

CodeMirror扩展为MediaWiki中的wiki文本（源代码）编辑器提供语法高亮功能. 它会在编辑工具栏中添加一个图标为的按钮，点击可以切换开启和关闭语法高亮. 支持2010年WikiEditor工具栏以及可视化编辑器工具栏.

语法高亮功能默认关闭. 开启功能后，它将使用CodeMirror库提供的编辑器替换标准的多行文本框. 功能关闭后，不产生效果.

The colors used in this extension have been optimised to provide higher contrast, accessibility and better readability.

Bracket matching
This feature allows highlighting of the closest matching pair of surrounding brackets while navigating through wikitext code using the cursor. Bracket matching will be active in both editors when syntax highlighting is turned on, in any namespace using these editors.

Line numbering
In the wikitext edit mode line numbers are automatically displayed in both editors.

浏览器支持
支持所有受MediaWiki支持的浏览器.

配置
颜色和样式的自定义见元维基帮助页面. 您可以使用自定义的wikitext语法高亮样式. 所用的样式在这里. 您的自定义样式应放入common.css.

添加上述代码到你的的结尾.

To try out the new features mentioned above in your local installation, add the following lines as well. Please note though, that these features are meant to become default features. The settings might not have an effect any more then.

扩展集成
如果你的MediaWiki扩展添加了新的标签并且想确保CodeMirror正确高亮其中的内容，可以为你的扩展添加CodeMirror支持. 两则例子：Cite扩展和PhpTags扩展.

JavaScript integration
The following front-end hooks are used in this extension:

有待完成

 * 高亮定义列表 (foo :bar ) ($T170042)
 * 自动完成（T95100）
 * 代码折叠
 * 高亮gallery标签中的内容

参见

 * 缺失的功能和错误概述：MediaWiki-extensions-CodeMirror
 * User:Remember the dot/Syntax highlighter
 * Community Tech/Wikitext editor syntax highlighting - includes information on customizing the colors
 * c:Category:MediaWiki extension CodeMirror
 * Community Tech/Wikitext editor syntax highlighting - includes information on customizing the colors
 * c:Category:MediaWiki extension CodeMirror
 * c:Category:MediaWiki extension CodeMirror