[Pmwiki-users] guiedit and editbar

PyG pyg_listes
Thu Jan 6 08:02:47 CST 2005


Hello world

Back from deserved vacations, I saw that my editbar cookbook was quite 
commented ( http://www.pmwiki.org/wiki/Cookbook/EditBar ), so I started to 
write over some corrections on the last few days. But I'm affraid I'm quite 
in a hurry on some other GPL projects, so I'm affraid I couldn't do a lot 
of work on this cookbook until the end of January :-(

I was about to propose to someone else to start back working on this when I 
saw that http://www.pmwiki.org/wiki/PmWiki/PmWiki?action=edit was already 
containing a Gui !!

It seems that Pm as already started to work over on a similar project, and 
I must admit than this guiedit.js code is _a lot_ better than the code I 
took on Dokuwiki.

The only things that my EditBar had and Pm's GuiEdit lack are the shortcuts 
(quite simple to add) and an undo button (wich I was workin on).

So I was wondering if I should remove the EditBar from the Cookbook in 
profit of Pm guiedit's work ?
I don't think pmWiki needs differents "guiEditBar", and I think that 
everyone (including me) will be more comfortable if the core code (will it 
be included in b15 ?) is written by Patrick.

Pierre-Yves

PS for Pm : Just for information, I found a simplier way to use javascript 
without modifing skin and mess the source code with JS buttons code 
displaying into source code :

    $EditBarButtons = "<script language=\"JavaScript\" 
type=\"text/javascript\" src=\"$PubDirUrl/editbar/editbar.js\"></script>
<script language=\"JavaScript\" type=\"text/javascript\" 
src=\"$PubDirUrl/editbar/buttons.php\"></script>";
    $PageEditFmt = preg_replace("`method='post'`", "method='post' 
name='editform'", $PageEditFmt);
    $PageEditFmt = preg_replace("`\<textarea`", "\$EditBarButtons 
\n<textarea ", $PageEditFmt);

That way, it display just before the textarea :

So The first line include needed functions (equivalent to guiedit.js) wich 
doesn't need a modification for existant skins and the second line is a PHP 
script echoing javascript code, so it permit some i18n.
Hope this help.




More information about the pmwiki-users mailing list