Syntax highlighter | |
Since Tiki7, Tiki is using CodeMirror (http://codemirror.net) as a syntax highlighter and indentation helper, which allows to highlight syntax in real time when the user is typing it.
CodeMirror.net wrote:
CodeMirror is a JavaScript library that can be used to create a relatively pleasant editor interface for code-like content - computer programs, HTML markup, and similar. If a parser has been written for the language you are editing, the code will be coloured, and the editor will help you with indentation.
It will also help with auto indentation of code (when required in some syntax) while typing it. |
1.1. Enabling the feature | |
In Tiki9, the switch for CodeMirror is located at "Admin home > Editing and Plugins > General Settings > Features > Syntax Highlighter (CodeMirror)" , with the Preference Filter "Basic" checked. In Tiki7 and Tiki8, CodeMirror was not enabled by default in new installations, so that it had to be enabled through: "Admin home > Text area ("Editing and plugins") > General Settings > Syntax Highlighter (CodeMirror)". If you don't see this option, ensure that you have the advanced admin settings displayed (tick the checkbox "advanced" or "experimental" in the admin panels. |
1.2. Where it is used | |
It is used in PluginCode and deployed in other places as needed. The basic idea is to make it work in text areas while you are editing text, so that it can help you while writing YAML markup when you are creating a configuration Profile, or when you are writing in wiki pages scripts in some programing languages like R (see PluginR), etc.
|
1.3. Syntaxes recognized | |
Although most Tiki syntax is recognized, the following items are known issues:
Since Tiki9, many more languages are supported, and a few theme styles are included for codemirror. See also:
Related
aliases
SyntaxHighlighter | SyntaxHighlighting | Syntax Highlighting | WYSIWYM | SH | Web-based source code editor | Code Mirror | CodeMirror
|