1<?php
2
3/**
4 * handles the data that has to be written into jsinfo
5 *
6 * like displaying the editor and adding custom edit buttons
7 */
8class action_plugin_edittable_jsinfo extends DokuWiki_Action_Plugin
9{
10    /**
11     * Register its handlers with the DokuWiki's event controller
12     */
13    public function register(Doku_Event_Handler $controller)
14    {
15        // register custom edit buttons
16        $controller->register_hook('DOKUWIKI_STARTED', 'BEFORE', $this, 'fill_jsinfo');
17    }
18
19    public function fill_jsinfo()
20    {
21        global $JSINFO;
22        $JSINFO['plugins']['edittable']['default columnwidth'] = $this->getConf('default colwidth');
23    }
24}
25