*/ // must be run within DokuWiki if(!defined('DOKU_INC')) die(); if(!defined('DOKU_PLUGIN')) define('DOKU_PLUGIN',DOKU_INC.'lib/plugins/'); require_once(DOKU_PLUGIN.'syntax.php'); /** * All DokuWiki plugins to extend the parser/rendering mechanism * need to inherit from this class */ class syntax_plugin_quickedit extends DokuWiki_Syntax_Plugin { /** * return some info */ function getInfo(){ return array( 'author' => 'Arthur Lobert', 'email' => 'arthur.lobert@thalesgroup.com', 'date' => @file_get_contents(DOKU_PLUGIN.'quickedit/VERSION'), 'name' => 'Plugin Quickedit (syntax component)', 'desc' => 'Edit your page in live with texbox', 'url' => 'http://dokuwiki.org/plugin:quickedit', ); } /** * Syntax Type * * Needs to return one of the mode types defined in $PARSER_MODES in parser.php */ function getType() { return 'substition'; } function getPType() { return 'block'; } function getSort() { return 304; } /** * Connect pattern to lexer */ function connectTo($mode) { $this->Lexer->addSpecialPattern('~~QUICKEDITSTART~~',$mode,'plugin_quickedit'); // $this->Lexer->addSpecialPattern('~~QUICKEDIT~~',$mode,'plugin_quickedit'); } /** * Handle the match */ // function handle($match, $state, $pos, &$handler){ // } /** * Create output */ function render($mode, &$renderer, $data) { global $ID; if ($data[0] == 'start') { $toto = 'quickedit_start'. $data[1]; $titi = 'quickedit_stop'. $data[1]; $renderer->doc .= "