User Tools

Site Tools


res:plugins:syntaxhighlighter-ng

This is an old revision of the document!


SyntaxHighlighter-NG

Author: DeltaLima

Description

Makes [code] blocks syntax highlighted (when language specified) with prism.js

By default the full prism.js language support is enabled (prism.full.js ~560kb), see the list of supported languages at prismjs.com

If you want, you can also use the included "prism.small.js" which is much smaller in size (~100kb), but also have less languages supported, but the most important ones are. Have a look into the README.md how to do so.

You find there as well how to change the prism.js theme.

Example

no syntax highlightning

[code]Just plain text e.g.[/code]

PHP code block

[code=php]<?php echo "This is an php example" ?>[/code]

apache config block

[code=apacheconf]<Location /example>
    Order Deny,Allow
    Deny from all
    Allow from .foo.com
</Location>[/code]

Download

Latest master from git.la10cy.net

Extract the content of the downloaded .zip into "fp-plugins/syntaxhighlighter/". You have to create the directory by hand first.

Demo

Support

Please ask for help on the FlatPress Forum

res/plugins/syntaxhighlighter-ng.1687345532.txt.gz ยท Last modified: by deltalima

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki