Highlight Plugin
This plugin integrates the famous javascript-library highlight from Ivan Sagalaev and it hightlights your code examples wrapped in <pre>
or <code>
tags. It offers some options like a theme selection, line numbers, and a clipboard button.
An example for YAML code with hightlights looks like this:
forms:
fields:
myfieldname:
type: text
label: Add a short text
anotherfield:
type: textarea
label: Add a long text
An example with php code looks like this:
<?php
namespace plugins\myplugin;
use \typemill\plugin;
class myplugin extends plugin
{
public static function getSubscribedEvents()
{
return [
'onPagetreeLoaded' => 'onPagetreeLoaded'
];
}
public function onPagetreeLoaded($navigation)
{
// do something with the $navigation
}
}