Syntax Highlighting Application
![]() | Provides Syntax Highlighting |
Type | XAR |
Category | |
Developed by | |
Rating | |
License | GNU Lesser General Public License 2.1 |
Bundled With | XWiki Standard |
Table of contents
Description
CodeMirror-based syntax highlighting for:
- JavaScript
- CSS
- Velocity
- Groovy
- Python
- HTML
- XWiki Macros (Experimental)
Syntax highlighting is automatically activated for:
- wiki editor
- object editor, for code properties of the following classes:
- XWiki.StyleSheetExtension
- XWiki.JavaScriptExtension
- XWiki.XWikiSkins (properties with the name ending in '.css' and '.js')
- XWiki.WikiMacroClass
- Panels.PanelClass (also exposed in the panel's sheet)
- XWiki.UIExtensionClass
- XWiki.SchedulerJobClass (also exposed in the job's sheet)
- XWiki.ComponentMethodClass
CodeMirror 5.x and lower is experimental and, in practice, a bit of a hit-or-miss (when it comes to the interaction with the editor). For practical purposes, we have decided to focus on the desktop for now, until CodeMirror 6 is out.
Syntax highlighting is disabled on mobile devices, as support for mobile devides inFeatures
- Syntax highlighting
- Line numbers
- Active line highlighting
- Tab line indentation
- 2 spaces on tab
- Matching and auto-closing brackets, parentheses and quotes
- Matching selection highlighting
- Scroll to undo/redo position
- Trailing whitespace highlighting
- Multiline comment auto indentation on newline
- Search/Replace with regex support
- Press Ctrl+F / Ctrl+Shift+F (while the editor is focused) to search inside the editor
- Press Ctrl+Shift+R (while the editor is focused) for search and replace
- Press F3 after searching for something (with the editor focused) in order to scroll to the next result
- Note: CTRL+G is already taken by the Go To popup.
- More keyboard shortcuts at https://codemirror.net/demo/search.html
- Fullscreen editing support
- Press F11 (while the editor is focused) to enter full screen
- Press Esc to exit full screen
- Autocompletion (by installing the AutoCompletion Application)
- 33 themes provided by codeMirror)
Other Screenshots
Release Notes
4.7
4.6.1
The following translations have been updated with this release:
4.6
4.5.2
4.5.1
4.5
4.4
4.3.1
4.3
4.2
4.1
4.0
3.4
3.3
3.2
3.1.1
3.1
3.0
2.2
2.1
2.0
Prerequisites & Installation Instructions
We recommend using the Extension Manager to install this extension (Make sure that the text "Installable with the Extension Manager" is displayed at the top right location on this page to know if this extension can be installed with the Extension Manager). Note that installing Extensions when being offline is currently not supported and you'd need to use some complex manual method.
You can also use the following manual method, which is useful if this extension cannot be installed with the Extension Manager or if you're using an old version of XWiki that doesn't have the Extension Manager:
- Log in the wiki with a user having Administration rights
- Go to the Administration page and select the Import category
- Follow the on-screen instructions to upload the downloaded XAR
- Click on the uploaded XAR and follow the instructions
- You'll also need to install all dependent Extensions that are not already installed in your wiki
Dependencies
Dependencies for this extension (org.xwiki.contrib.editortool:editor-tool-highlighting-ui 4.7):