public function register(Doku_Event_Handler $controller) { $controller->register_hook('HTML_SECEDIT_BUTTON', 'BEFORE', $this, '_editbutton'); $controller->register_hook('HTML_EDIT_FORMSELECTION', 'BEFORE', $this, '_editform'); } public function _editform(Doku_Event $event, $param) { global $TEXT; // FIXME: Insert plugin name if ($event->data['target'] !== 'plugin_exampleplugin') { // Not an edit for exampleplugin return; } $event->preventDefault(); // FIXME: Remove this if you want the default edit intro unset($event->data['intro_locale']); // FIXME: Remove this if you want a media manager fallback link // You will probably want a media link if you want a normal toolbar $event->data['media_manager'] = false; // FIXME: Create the lang files edit_intro.txt echo $this->locale_xhtml('edit_intro'); // FIXME: Add real edit form $attr = array(); if (!$event->data['wr']) $attr['readonly'] = 'readonly'; $event->data['form']->addElement(form_makeWikiText($TEXT, $attr)); }