Summary: Talk page for GuiEdit.
Maintainer: Pm
Users: +2 (View / Edit)

This space is for User-contributed commentary and notes. Please include your name and a date along with your comment.


What is the right way to disable default buttons? I need only two buttons, how can I disable all other?

I'm not sure it is correct way, but it works for me. Put this code in config.php:

$GUIButtons ['em'] = array(NULL); 
$GUIButtons ['strong'] = array(NULL); 
$GUIButtons ['pagelink'] = array(NULL); 
$GUIButtons ['extlink'] = array(NULL); 
$GUIButtons ['big'] = array(NULL); 
$GUIButtons ['small'] = array(NULL); 
$GUIButtons ['sup'] = array(NULL); 
$GUIButtons ['sub'] = array(NULL); 
$GUIButtons ['h2'] = array(NULL); 
$GUIButtons ['center'] = array(NULL); 
$GUIButtons ['attach'] = array(NULL); 

After this I can make my new buttons.

Finar April 15, 2019, at 11:19 AM

It is intended to be disabled with $GUIButtons['em'] = false; in config.php --Petko April 15, 2019, at 03:29 PM

02/10/2009, Question

To use the buttons with the array above located in config.php it looks like I have to comment out the array that is located in pmwiki/scripts/guiedit.php, otherwise the new array on config.php will place its buttons before the default buttons. Is this true, or am I missing something? If true, then it slightly complicates updating pmwiki.


04/15/2019, Answer

No, it's ok, SDVA function is used in guiedit.php.



Q: a wiki-GUIButton

Is it possible to have a button to write the text of another choosen model of page (same pmwiki) ?

$GUIButtons ['pagetext'] = array($ArrayCount++, 'text of the another pmwikipage PageName', ...);

Thanks. FidelioEspoir


An improvement to the script can be to allow an undo. On some browser/installation 'Ctrl-Z' works, but not on all.

Q: Is it possible to add a 2nd row of buttons below the first one ? jmi Also curious about this as well -cs

A: Yes. The fifth parameter is either a URL or HTML. Simply use <br />. DaveG

Is it possible to realize a button for newline \\??? Solution is simple the linebreaks nolinebreaks markup!!!

Q:In Opera and Khtml the text is inlined at the end of the document, not at the cursor position. - Schlaefer

This is a known limitation of Opera -- Opera doesn't provide the ability to find the current cursor position or insert text into the middle of a <textarea> element. I don't know about Khtml, but I suspect it's the same thing. --Pm
19 Aug 2006 - I've heard that latest versions of Opera and Safari should somehow support text insertion in the middle of a <textarea>. This is also what I've found written at -- Luigi

I didn't know that. I choose not to output the buttonbar by putting the following at the beginning of insButton()

 var clientPC = navigator.userAgent.toLowerCase(); 
 var BrowserIsSafari = ((clientPC.indexOf('applewebkit')!=-1)
                 && (clientPC.indexOf('spoofer')==-1));
 var BrowserIsOpera = clientPC.indexOf('opera')!=-1;
 if (BrowserIsSafari || BrowserIsOpera) return;


Q: My edit screen does not include the "save and edit", "preview", "cancel" and summary and author boxes at the bottom of the screen. I installed pmwiki 2.0.13 on 2/17/2006. Cari

Looks like some of the Site pages didn't get loaded. Perhaps re-install?

Q: Have you considered a "remove all formatting markup" button? --Karl

Q: I love the the way these buttons look and function, but how do I get these buttons to appear on a page that's not in edit-mode, for instance one where FoxCommentBox is being used? GuiButtons allows for a (:guibuttons:) markup, why can't this one? Also, where are the smileys?

Q: Is it possible use single quotes (') in the default text that is inserted by GuiButtons when no markup is selected?

A: Yes, but you need to write it \\&apos; in the forth argument of the defining array:

  $GUIButtons ['mybutton']    =      array($ArrayCount++, 
                                      "prefix - no problem:'''",
                                      "''' suffix",

I've combined the two recipes, GuiEdit (on this page) with GuiButtons. It is not exactly the same - it's my own personal setup, therefore not all of the specialty buttons listed above are included (though it'd be easy to copy and paste them right back in). The smiley's have also been added, and can easily be turned on with $Smileys = true; - just be sure to declared this before you include the recipe.

To get started, just 1) download ao.guiedit.phpΔ and call include_once("$FarmD/cookbook/ao.guiedit.php"); in config.php, and 2) download the buttons folder MyGuiEdit2.zipΔ, and place the folder 'MyGuiEdit' in your '/pmwiki/pub' directory. Note that this collection is only different from the '' offered above in that it contains a 'smileys' folder containing the smiley icons that are provided with the GuiButtons recipe.

Once uploaded & included: As with GuiButtons, the markup (:guibuttons:) is now available to call these buttons wherever you want on a page, without needing to be in edit-mode, which is useful for pages with FoxCommentBox, where users might be posting a comment on page that they're browsing. For it to work, be sure to add id=text to your input textbox, like so:

                (:input textarea id=text name=comment cols=60 rows=6:)

See GuiButtons for more details...

overtones99 June 29, 2008, at 06:43 PM

I modified overtones99's GuiEdit AIO version as follows:

  • Test with pmwiki 2.2.15
  • Add $RecipeInfo = "2010-05-03 AIO"
  • Fix use of % in color,bgcolor,left/right/center,image,table
  • Fix image markup issue
  • Various fixes and a couple of string changes to enable effective translations ( XL )
  • Replace H1 button with preformatted text button, in line with the thinking that H1 is reserved for page title. Uncomment/comment 2/2 lines to get H1 back.
  • You can download the modified version here ao.guiedit-2010-05-03.phpΔ.
  • Find a list of translation strings here.

I've copied everything in what I think is the right place, but can't get any Gui buttons at all!!! Help!!! Promsan July 24, 2009, at 07:07 AMPromsan

Talk page for the GuiEdit recipe (users).