HTML Formatter

$formatter = new \Kadet\Highlighter\Formatter\HtmlFormatter($options = [
    'prefix' => 'kl-',
    'tag'    => 'span'
]);

HTML Formatted

Configuration

Now there are only 2 available options:

  • prefix - sets prefix for css classes
  • tag - sets outputted html tag

Setup

For displaying code generated by HTML formatter you also need stylesheet, there are few included in package. You can fin them in Styles/Html/dist/ directory as pre generated css files with default kl- class prefix, SCSS source files are available in Styles/Html. More information on styles, can be found in styling section.

KeyLighter dark style
GitHub style
PHP style