====== SyntaxHighlightJS Plugin ======
---- plugin ----
description: Syntax Highlighter for DokuWiki with highlight.js
author : Claud D. Park
email : posquit0.bj@gmail.com
type : syntax, action, helper
lastupdate : 2015-12-27
compatible : 2014-09-29 2015-08-10
depends :
conflicts : syntaxhighlighter3
similar : syntaxhighlighter3
tags : highlight, syntax, code, highlightjs, source, sourcecode
downloadurl: https://github.com/posquit0/dokuwiki-plugin-syntaxhighlightjs/archive/v1.0.0.zip
bugtracker : https://github.com/posquit0/dokuwiki-plugin-syntaxhighlightjs/issues
sourcerepo : https://github.com/posquit0/dokuwiki-plugin-syntaxhighlightjs
donationurl: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=ME2U7Y7GQK748
screenshot_img : https://raw.githubusercontent.com/posquit0/dokuwiki-plugin-syntaxhighlightjs/master/examples.png
----
This plugin gives you the ability to highlight the code(using **[[https://highlightjs.org|Highlight.JS Plugin]]**) inside containers (pre > code) with following options:
* a programming language
* a width
* a certain class (with loads of useful preset classes, ex. center, round)
===== Installation =====
Search and install the plugin using the [[plugin:extension|Extension Manager]]. Refer to [[:Plugins]] on how to install plugins manually.
===== Syntax =====
Basic Syntax:
source code
===== Examples =====
A simple usage:
from sys import exit
def main():
sys.exit(0)
if __name__ == '__main__':
main()
Some more complex usage
var gulp = require('gulp');
gulp.task('default', function() {
// place code for your default task here
});
Private newPropertyValue As String
Public Property NewProperty() As String
Get
Return newPropertyValue
End Get
Set(ByVal value As String)
newPropertyValue = value
End Set
End Property
#if 0
#include "pch.h" // or whatever line you had selected
#endif // 0
* **Screenshot**
{{ https://raw.githubusercontent.com/posquit0/dokuwiki-plugin-syntaxhighlightjs/master/examples.png?direct&600 |}}
===== Configuration and Settings =====
^ Option ^ Description ^ Default value ^
|''syntax'' | Which name to use for syntax | sxh |
|''theme'' | theme for styling your code | default |
|''restrictedClasses'' | restrict usage of plugin to these (comma separated) classes | //(empty)// |
===== Development =====
=== Change Log ===
* **2015-12-27**
* Initial release
=== Known Bugs and Issues ===
* Please use [[https://github.com/posquit0/dokuwiki-plugin-syntaxhighlightjs/issues|an issue board]] on GitHub project page.
=== ToDo/Wish List ===
* Support line-number
* Support in the editing toolbar
===== FAQ =====
* Not yet
===== Credits =====
* The code reuses parts of the [[wrap]] plugin by [[anika@selfthinker.org|Anika Henke]].
* Thanks to [[https://github.com/posquit0/dokuwiki-plugin-syntaxhighlightjs/contributors|all contributors]].
===== Discussion =====
Before reporting any issues (bugs or requests), please first take a look at the [[faq:pluginproblems|FAQ on plugin problems]].
You can report any issues either on the [[https://github.com/posquit0/dokuwiki-plugin-syntaxhighlightjs/issues|Issue Tracker]] or on the separate [[.:syntaxhighlightjs:discussion]] page.