Skip to content

Cotonti-Extensions/syntax-highlighter

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

31 Commits
 
 
 
 

Repository files navigation

Syntax Highlighter

Plugin for Cotonti CMF. Client side code highlighter This is ready-to-use Cotonti port of SyntaxHighlighter by Alex Gorbatchev.

Authors:

Plugin page: https://www.cotonti.com/extensions/editor-parser/syntax-highlighter

Installation

  • Download the plugin and extract "syntaxhighlighter" folder into your Cotonti plugins folder.
  • Go to Administration / Extensions and install the SyntaxHighlighter plugin.
  • Go to the plugin configuration and select the desired theme and set other options if you need

Usage

Usage with HTML parsing: To highlight source code with some specific language, use HTML tags like this:

<pre class="brush:language;">
Your code here
</pre>

The list of available brushes and themes: https://github.com/syntaxhighlighter/syntaxhighlighter/wiki/Brushes-and-Themes

Plugin for CKEditor: https://ckeditor.com/cke4/addon/syntaxhighlight, https://github.com/dbrain/ckeditor-syntaxhighlight

Color themes

Plugin bundled with a pack of predefined color themes. But you can adjust some of it to suit you needs with Cotonti theme colors. To do that copy theme CSS file from syntaxhighlighter/lib/ folder to your theme sub folder named stylesthemes/theme-name/styles. File name shoud have prefix syntaxhighlighter-. For example custom theme file full name can be like this: themes/theme-name/styles/syntaxhighlighter-my-awesome-theme.css.
Now you can change it for your needs or create your own. All CSS files located in themes/theme-name/styles folder override default ones with same names.

Examples

Default theme:
SyntaxHighlighter

Cotonti theme:
SyntaxHighlighter_theme-cotonti-1

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 72.4%
  • CSS 25.1%
  • PHP 2.4%
  • HTML 0.1%