Loading...
 

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.


This way, Tiki becomes a WYSIWYM editor (“What You See Is What You Mean”). This means that Tiki helps the author interpret different aspects of the code (tags, strings, subroutines and so forth) which are highlighted or given different colours. This is comparable to the way code editing software works. So instead of using mark-up during editing to illustrate the end result (WYSIWYG), mark-up is used to illustrate the meaning and functionality of different parts of the code.

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:
  • When using the Autolinks option, links are not highlighted in the editor.

Since Tiki8, users can change highlighting mode (to select other languages, or to display line numbers, etc). Moreover, there is new option to temporarily disable the highlighting in some textarea while typing it, in case for some reason the user prefers to see everything with no colors and no self modifying the display temporarily.

Since Tiki9, many more languages are supported, and a few theme styles are included for codemirror.

See also:
http://doc.tiki.org/PluginCode#Codemirror_-_Supported_Languages

Related

aliases
SyntaxHighlighter | SyntaxHighlighting | Syntax Highlighting | WYSIWYM | SH | Web-based source code editor | Code Mirror | CodeMirror



doc.tiki.org


Bootstrap

AdminGuide

UserGuide

Keywords

Keywords serve as “hubs” for navigation within the Tiki documentation. They correspond to development keywords (bug reports and feature requests):

Accessibility (WAI and 508)
Accounting (7.x)
Articles and Submissions
Backlinks
Banners
Batch (6.x)
BigBlueButton audio/video/chat/screensharing (5.x)
Blog
Bookmark
Browser Compatibility
Link Cache
Calendar
Category
Chat
Clean URLs
Comments
Communication Center
Compression (gzip)
Contacts (Address Book)
Contact us
Content Templates
Contribution (2.x)
Cookie
Copyright
Credit (6.x)
Custom Home and Group Home Page
Date and Time
Debugger Console
Directory of hyperlinks
Documentation link from Tiki to doc.tiki.org (Help System)
Docs 8.x
Draw 7.x
Dynamic Content
Dynamic Variable
External Authentication
FAQ
Featured links
File Gallery
Forum
Friendship Network (Community)
Gmap Google maps
Groups
Hotword
HTML Page
i18n (Multilingual, l10n, Babelfish)
Image Gallery
Import-Export
Install
Integrator
Interoperability
Inter-User Messages
InterTiki
Kaltura video management (4.x)
Karma
Live Support
Login
Logs (system & action)
Look and Feel
Lost edit protection
Mail-in
Map with Mapserver
Menu
Meta Tags
Mobile Tiki and Voice Tiki
Mods
Module
MultiTiki
MyTiki
Newsletter
Notepad
Payment
Performance Speed / Load
Permissions
Platform independence (Linux-Apache, Windows/IIS, Mac, BSD)
Polls
Profiles
Profile Manager
Report
Toolbar
Quiz
Rating
Feeds
Score
Search engine optimization
Search
Search and Replace
Security
Semantic links (3.x)
Shadowbox
Shadow Layers
Share
Shopping cart
Shoutbox
Slideshow
Smiley
Social Networks
Spam protection (Anti-bot CATPCHA)
Spellcheck
Spreadsheet
Stats
Surveys
Tags (2.x)
Task
Tell a Friend, alert + Social Bookmarking
TikiTests (2.x)
Theme CSS & Smarty
Trackers
Transitions (5.x)
TRIM
User Administration including registration and banning
User Files
User Menu
Watch
WebHelp
WebDAV (5.x)
Webmail
Web Services
Wiki 3D
Wiki History, page rename, etc
Wiki Page Staging and Approval (2.x)
Wiki Plugin extends basic syntax
Wiki Syntax
Wiki structure (book and table of content)
Workspace
WSOD
WYSIWYCA
WYSIWYG (2.x)
XMLRPC

Tiki Newsletter

Delivered fresh to your email inbox!
Newsletter subscribe icon
Don't miss major announcements and other news!
Contribute to Tiki
Show php error messages