* @author Sascha Leib */ class action_plugin_adhocwrap extends DokuWiki_Action_Plugin { /** * register the eventhandlers * * @author Andreas Gohr * @author Sascha Leib */ function register(Doku_Event_Handler $controller){ $controller->register_hook('TOOLBAR_DEFINE', 'AFTER', $this, 'handle_toolbar', array ()); } function handle_toolbar(Doku_Event $event, $param) { /* create the menu */ $event->data[] = array ( 'type' => 'picker', 'title' => 'Ad-Hoc Wrap', 'icon' => '../../plugins/adhocwrap/images/wrap.svg', 'id' => 'tbbtn_adhocWrap', 'list' => array( array( 'type' => 'format', 'title' => 'Outline box (div)', 'icon' => '../../plugins/adhocwrap/images/box-outline.svg', 'open' => '
', 'close' => '
', 'sample' => '\nOutline box\n' ), array( 'type' => 'format', 'title' => 'Info-Block (div)', 'icon' => '../../plugins/adhocwrap/images/information-slab-box-outline.svg', 'open' => '
', 'close' => '
', 'sample' => '\nInformation Block\n' ), array( 'type' => 'format', 'title' => 'Tip-Block (div)', 'icon' => '../../plugins/adhocwrap/images/lightbulb-box-outline.svg', 'open' => '
', 'close' => '
', 'sample' => '\nTip Block\n' ), array( 'type' => 'format', 'title' => 'Important Block (div)', 'icon' => '../../plugins/adhocwrap/images/alert-box-outline.svg', 'open' => '
', 'close' => '
', 'sample' => '\nImportant Block\n' ), array( 'type' => 'format', 'title' => 'Alert Block (div)', 'icon' => '../../plugins/adhocwrap/images/close-box-outline.svg', 'open' => '
', 'close' => '
', 'sample' => '\nAlert Block\n' ), array( 'type' => 'format', 'title' => 'Inline block (aside)', 'icon' => '../../plugins/adhocwrap/images/aside-block.svg', 'open' => '', 'sample' => 'Aside block' ), array( 'type' => 'format', 'title' => 'Illustration block, floating right, with border and outline (aside+figure)', 'icon' => '../../plugins/adhocwrap/images/float-block-right.svg', 'open' => '', 'sample' => 'Figure content' ), array( 'type' => 'format', 'title' => 'Illustration block, floating left, with border and outline (aside+figure)', 'icon' => '../../plugins/adhocwrap/images/float-block-left.svg', 'open' => '', 'sample' => 'Figure content' ), array( 'type' => 'format', 'title' => 'Layout 2 columns (div)', 'icon' => '../../plugins/adhocwrap/images/layout-2-columns.svg', 'open' => '
\n
\n', 'close' => '\n
\n
\nColumn 2\n
\n
', 'sample' => 'Column 1' ), array( 'type' => 'format', 'title' => 'Layout 3 columns (div)', 'icon' => '../../plugins/adhocwrap/images/layout-3-columns.svg', 'open' => '
\n
\n', 'close' => '\n
\n
\nColumn 2\n
\n
\nColumn 3\n
\n
', 'sample' => 'Column 1' ), array( 'type' => 'format', 'title' => 'Marker red', 'icon' => '../../plugins/adhocwrap/images/marker-red.svg', 'open' => '', 'close' => '', 'sample' => 'Red marked text' ), array( 'type' => 'format', 'title' => 'Marker orange', 'icon' => '../../plugins/adhocwrap/images/marker-orange.svg', 'open' => '', 'close' => '', 'sample' => 'Orange highlight' ), array( 'type' => 'format', 'title' => 'Marker green', 'icon' => '../../plugins/adhocwrap/images/marker-green.svg', 'open' => '', 'close' => '', 'sample' => 'Green marked text' ), array( 'type' => 'format', 'title' => 'Marker cyan', 'icon' => '../../plugins/adhocwrap/images/marker-cyan.svg', 'open' => '', 'close' => '', 'sample' => 'Cyan marked text' ), array( 'type' => 'format', 'title' => 'Marker grey', 'icon' => '../../plugins/adhocwrap/images/marker-grey.svg', 'open' => '', 'close' => '', 'sample' => 'Grey marked text' ), array( 'type' => 'format', 'title' => 'Maximum emphasis', 'icon' => '../../plugins/adhocwrap/images/strong-emphasis.svg', 'open' => '', 'close' => '', 'sample' => 'Emphasis' ), array( 'type' => 'format', 'title' => 'Small grey text', 'icon' => '../../plugins/adhocwrap/images/small-text.svg', 'open' => '', 'close' => '', 'sample' => 'side content' ) ) ); } }