« Return to EditToolbar

Summary: Talk page for EditToolbar.
Maintainer: DaveG
Categories: Edit, Discussion


Changes Required for Compatibility with CloudFlare's RocketLoader

You'll need to ensure that this doesn't get passed through CloudFlare's RocketLoader in order for it to work. The JavaScript breaks otherwise. (I don't know why. I just know that the buttons wouldn't show up until I bypassed RocketLoader.) You must add the following to local/config.php in order to get it to function with RocketLoader in automatic mode:

$HTMLHeaderFmt['guiedit'] = "<script data-cfasync='false'

 Markup_e('e_guibuttons', 'directives',
     str_replace('<script', '<script data-cfasync=\"false\"',
     GUIButtonCode(\$pagename)), \$pagename))");

Solution provided by Petko. MathewReuther April 20, 2014, at 11:29 PM

Looks and Works Great!

crookedshack 11 November, 2009: I just installed this tonight and it works great...now. I had forgotten that I had added some of the extra buttons in guiedit folder to the bottom of the config.php file. I was getting the question marks for 8 of the buttons. Removed those lines and all is great. Thanks for the effort and thanks for sharing.

11-Nov-2009 DaveG: Thanks for the comment, glad you got it working.

Sven, 2009-12-15: I too like your recipe! Thank you! The instructions are very clear. (I also got "25" instead of the percentage sign, but I do not want to use the indentation buttons, so this is no problem for me. firefox 3.5.5, pmwiki 2.2.8.)

Open Questions

How to use with GuiButtons recipe?

The buttons and smileys(!) provided with the GuiButtons recipe isn't my cup of tea, but GuiButtons with forms is nice. If I could use these buttons instead it would be great. Any ideas? Bergwitz February 15, 2010, at 06:36 AM]]

Some buttons did'nt appear

October 13, 2009, at 06:38 PM mrjk?: Some buttons didn't appear well in FireFox. I fixed the problem in cookbook/editToolbar.php by renaming h2 by et_h2, and it worked well after. Somebody can explain me why? thx ^^

11-Nov-2009 DaveG: Sorry for the late response -- I didn't see your question before. So you renamed the 'h2' array element to 'h2_et' and everything worked? It sounds like you may have previously changed the $GUIButtons array, and so needed to declare a new element. Anyway, if you still need help let me know.

Right justify button doesn't work

30-Sep-2009 Basel Shishani?: When I use the right justify button, I get this string inserted into the text: %25right%25 which is displayed as is in the view without any effect on text justification.

1-Oct-2009 DaveG: So you see the percentage signs and the number 25? What you should see is %right%. What browser (and version) are you using?

Close Questions

Incorrect RecipeInfo setting in edittoolbar.php?

Status: Issue fixed (1.1.1)

IDB 27-May-2009: Hi Dave! Just been working on another Wiki and using your EditToolbar recipe. When I used the recipecheck recipe, I noticed that I had an entry for a BlogIt recipe, only I have not installed that recipe. Delving into the innards, I found that you have set in edittoolbar.php the following:

$RecipeInfo['BlogIt']['Version'] = '2009-03-01';

Shouldn't this line read

$RecipeInfo['EditToolbar']['Version'] = '1.1.0';


DaveG 27-May-2009: You are correct -- I have no idea how I managed that (although clearly a copy/paste error; I wonder how long it's been in there... interesting to see what I have in SVN. I'll fix that tonight.

IDB 27-May-2009: I think it was a simple copy+paste error. Been there a while I think, but it's only now that I am working on a new site that I decided to get to the bottom of it, so I can update my boilerplate PmWiki files. :-)

DaveG 28-May-2009: Fixed with version 1.1.1.

Display problem appears in the Safari browser

Status: Issue closed

The italic icon and bold icon do not display properly (but they work properly!) in OS X Safari (ver4 or ver3), instead an exclamation mark appears. Not that it would be a solution but with the command unset($GUIButtons['em']) I do not seem to be able to turn off the italic button.

DaveG 9-Apr-2009 9:00 AM:
  • fyi -- It works under Safari 3.2.1 in Windows. There may be differences of course under different OS.
  • I think an exclamation mark in Safari means that the image is not available. Can you double check that the icons text_italic.png is visible from the browser? (You'll need to work out the image path, and paste it into the browser.) If you're unsure how to do that, just verify that the icons are there in the pub/edittoolbar/ directory.
  • The fact you can't unset it is interesting -- need more though.
  • The italic and bold buttons are declared differently to other icons -- they are defined with keyboard shortcuts. Perhaps thats the issue. If can, take a look in edittoolbar.php. On line 23, remove the last parameter -- so remove this:

Fabrizio? 12-Apr-2009: Dave, thanks for your help but no luck. Safari can see the icons no problem and deleting ,'$[ak_em]' doesn't seem to fix the problem. Let me know if I can help in some how.

DaveG 12-Apr-2009 10:58 PM: Can you publish the site url so I can take a look? It seems odd that only two icons don't show up and are reported as missing icons, and the rest work fine. Particularly if the icons are public ally available (via a web browser) -- why is Safari reporting them as unavailable?

Just thought of something else. Can you let me know where you installed the edittoolbar .php file, and the directory? Also, what do you have in config.php?

Fabrizio 17-Apr-2009: website is still under construction but if you want to have a look, here you go: www.vincentresearch.com

a screen capture of the problem is here (not sure you can see it): [(approve links) edit diff]

the edittoolbar.php is in cookbook folder and the edittoolbar folder is in pub folder. In my config.php I have this:

$EnableGUIButtons = 1;
$GUIButtons['H1'] = array(10, '! ', ' ', 'Subheading','$GUIButtonDirUrlFmt/text_heading_1.png"Subheading Level 1"');
$GUIButtons['H2'] = array(20, '!! ', ' ', 'Subheading','$GUIButtonDirUrlFmt/text_heading_2.png"Subheading Level 2"');

I hope this will help

DaveG 17-Apr-2009: The screenshot seems to indicate you've moved some icons around which leads me to believe you have some other settings in a config file that are affecting edittoolbar. Compare your screenshot with the one on the cookbook page, and you'll see what I mean. In your case the B and I are missing -- there is no missing file icon, there is nothing at all. You then have a missing image icon before larger and smaller text -- by default there is nothing before larger and smaller text icons, and finally you have something at the end.
  1. Post the other edittoolbar settings -- there must be some in there somewhere.
  2. Are the privs set the same for all icon images in the directory?
  3. Either could you post the url's of one image that doesn't work, and one that does? OR
  4. Do the images appear in different browsers? (or post/email a password for a test page so I can take a look at the edit toolbar -- I'm on pmwiki at solidgone dotty com)

Fabrizio 20-Apr-2009: Dave, I don't understand what is your website, perhaps we should continue our conversation by mail? before I start doing all the modifications you suggest, I should tell you that on Firefox everything works beautifully. I don't think I have moved anything. If you have time, drop me a line. Cheers.

"Submit Query" appears when removing buttons

Status: Issue closed

15 Mar 2009, kpmartin?: Nice job. I put the unset for author in config.php but it left an artifact "Submit Query" in place of the buttons.

15-Mar-2009, DaveG: I suspect you might be using an older version of the configuration steps. Can you verify that you don't have an include_once("$FarmD/scripts/guiedit.php"); in your config.php.

How do I control which buttons to show?

Bergwitz: I'd like to remove the buttons for authors, as it's not in use om our site.

DaveG: Added an entry in the FAQ, for removing buttons.

Bergwitz March 14, 2009, at 09:53 PM: Great, thanks! This buttons are much nicer than the default, and the setup is more intutive. Maybe they should be the default.

I'd like to include other buttons in addition to the 'default' set from EditToolbar.

Status: Issue resolved

IDB: Is it simply a case of editing the php file and adding the extra buttons into the arrays?

DaveG: Added an entry in the FAQ, for adding buttons.

4-Mar-2009 IDB: Thanks, Dave -- will test this out on my site.

4-Mar-2009 DaveG: I also added some more detailed instructions on the FAQ. Let me know how it goes.

5-Mar-2009 IDB: Works well. I might, if I get time, add to your FAQs a list of the icon numbers so people can see where they can position their new icons between existing icons.

17-Mar-2009 IDB: Found the time (displacement activity), so created this table of the array numbers, as promised.

17-Mar-2009 DaveG: Table moved over to main page -- thanks!

I'd love to know if you use this cookbook, or even if you like or hate it. Leave a comment, or see the discussion at EditToolbar-Talk-Talk?.

Comment : you left an old code for "Center" and "Right" --> you have to remove the 25 in "%25center%25" and "%25right%25" in the php script.

How can I customise the markup for each button; for example I want to change the simple table markup, use thumblist recipe rather than attach, and add tooltips to the link markup, or do I just change the recipe? simon May 26, 2013, at 03:46 PM

Talk page for the EditToolbar recipe (users).