register_hook('TOOLBAR_DEFINE', 'AFTER', $this, 'handle_toolbar', array ()); } function handle_toolbar(&$event, $param) { $unit = array( 'type' => 'format', 'title' => 'Insert an unit test', 'icon' => '../../plugins/'. PluginUtility::PLUGIN_BASE_NAME .'/images/unit-doc-block.png', 'open' => '\n\n\n\t', 'close' => '\n\t\n\tt\n\t\n', // 'key' => $unitShortcutKey ); /** * This is called from the js.php with a get HTTP * There is no knowledge of which page is modified */ $frontmatter = << 'insert', 'title' => 'Insert a frontmatter', 'icon' => '../../plugins/' . PluginUtility::PLUGIN_BASE_NAME . '/images/table-of-contents.svg', 'insert' => $frontmatter, 'block' => true ); $blockquote = array( 'type' => 'format', 'title' => 'blockquote', 'icon' => '../../plugins/' . PluginUtility::PLUGIN_BASE_NAME . '/images/blockquote-icon.png', 'open' => '
', 'close' => '
', ); $event->data[] = array( 'type' => 'picker', 'title' => "Choose comboStrap component", 'icon' => '../../plugins/' . PluginUtility::PLUGIN_BASE_NAME . '/images/logo.svg', 'list' => array($frontmatter,$blockquote,$unit) ); return true; } }