*/ // must be run within Dokuwiki if (!defined('DOKU_INC')) { die(); } class action_plugin_jsontable extends DokuWiki_Action_Plugin { /** * Registers a callback function for a given event * * @param Doku_Event_Handler $controller DokuWiki's event controller object * * @return void */ public function register(Doku_Event_Handler $controller) { $controller->register_hook('TPL_METAHEADER_OUTPUT', 'BEFORE', $this, 'handle_tpl_metaheader_output'); } /** * Handle event TPL_METAHEADER_OUTPUT * * Adds javascript and css files to html document. * * @param Doku_Event $event event object by reference * @param mixed $param [the parameters passed as fifth argument to register_hook() when this * handler was registered] * * @return void */ public function handle_tpl_metaheader_output(Doku_Event $event, $param) { $event->data["script"][] = array ( "type" => "text/javascript", "src" => DOKU_BASE."lib/plugins/jsontable/script/handsontable.full.min.js", "_data" => "", ); } }