[dokuwiki] Re: How to add a drop-down list to the edit toolbar?
- From: "TNHarris" <telliamed@xxxxxxxxxxx>
- To: dokuwiki@xxxxxxxxxxxxx
- Date: Tue, 25 Sep 2007 16:07:16 -0400
On Mon, 24 Sep 2007 14:40:58 +0200, "Gunther Pilz"
<dokuwiki@xxxxxxxxxxxxxx> said:
>
> The options I'll need for my select aren't static values. I'll have to
> generate them by a php function.
The TPL_METAHEADER_OUTPUT action event lets you insert scripts into the
HTML header. Create an action plugin (which can have the same name as
your syntax plugin)
function handle_event(&$event, $param) {
global $ACT;
if ($ACT=='edit') {
$scripts =& $event->data['script'];
$js = $this->_create_script();
$scripts[] = array( 'type'=>'text/javascript',
'charset'=>'utf-8',
'_data'=>$js );
}
}
See http://wiki.splitbrain.org/plugin:action_tutorial
-- tom
telliamed@xxxxxxxxxxx
--
http://www.fastmail.fm - A fast, anti-spam email service.
--
DokuWiki mailing list - more info at
http://wiki.splitbrain.org/wiki:mailinglist
- References:
- [dokuwiki] How to add a drop-down list to the edit toolbar?
- From: Gunther Pilz
- [dokuwiki] Re: How to add a drop-down list to the edit toolbar?
- From: TNHarris
- [dokuwiki] Re: How to add a drop-down list to the edit toolbar?
- From: Gunther Pilz
Other related posts:
- » [dokuwiki] How to add a drop-down list to the edit toolbar?
- » [dokuwiki] Re: How to add a drop-down list to the edit toolbar?
- » [dokuwiki] Re: How to add a drop-down list to the edit toolbar?
- » [dokuwiki] Re: How to add a drop-down list to the edit toolbar?
- » [dokuwiki] Re: How to add a drop-down list to the edit toolbar?
- [dokuwiki] How to add a drop-down list to the edit toolbar?
- From: Gunther Pilz
- [dokuwiki] Re: How to add a drop-down list to the edit toolbar?
- From: TNHarris
- [dokuwiki] Re: How to add a drop-down list to the edit toolbar?
- From: Gunther Pilz