|
Cookbook /
GuiButtonsSummary: add guibuttons to any textarea edit box
Version: 2007-04-23
Prerequisites: PmWiki 2
Status: stable
Maintainer:
Questions answered by this recipeHow can I add guibuttons like there are for the edit window to a multiline text input box? DescriptionThis recipe adds a guibuttons markup, which adds GUI edit buttons to any textarea input box Install by downloading guibuttons.zipΔ, unzipping to pub/guibuttons, and moving guibuttons.php into the cookbook folder. Add to config.php: include_once("$FarmD/cookbook/guibuttons.php");
The pub/guibuttons/folder contains a selection of guibutton images, from DWin's MyGuiEdit.zipΔ, and a selection of smiley images, used for adding smileys. The location of the gui images could be changed, as could be the guibuttons used, by editing the guibuttons.php file. To add guibuttons to a textarea input control put markup (:input textarea id=text name=comment cols=60 rows=6:)
The id=text is used by the javascript to put the markup into the text box. The javascript used is PmWiki's default script for guiedit buttons. The smileys placed with smiley buttons are displayed with an included selection of smiley markup definitions from WikiSmileys. If you want the full range of shortcut smileys you want to install WikiSmileys. NotesIf one wants to have the gui buttons offered by this recipe in the general edit form, then one could do simply 1. disable PmWiki guibuttons in config.php with $EnableGUIButtons = 0; //or comment out the line
2. change in Site.EditForm or whatever edit form is used for general editing the markup (:e_guibuttons:) to (:guibuttons:)
Release Notes
CommentsNot a big deal, but button images are sourced from I've just combined this recipe with the GuiEdit recipe. Download ao.guiedit.phpΔ and MyGuiEdit2.zipΔ, and see GuiEdit#guiedit_guibtns_combo for more details. overtones99 June 29, 2008, at 06:54 PM See Also
Contributors |