Summary: Integrate Wikiwyg into PmWiki for WYSIWYG editing
Version: 20070211
Status: pre-alpha
Maintainer: Evan Prodromou
Categories: Editing, Wikiwyg, Wysiwyg

Questions answered by this recipe

  • Can I edit pages without using wiki markup?
  • Is there a WYSIWYG mode for PmWiki?
  • Has anyone tried integrating Wikiwyg with PmWiki?
  • Can I have a WYSIWYG wiki that stores its pages in wiki markup?
  • How can I help make PmWiki competitive with commercial wiki software?


This recipe integrates Wikiwyg, a WYSIWYG editing library specifically for wiki markup, into PmWiki. It's a cookbook extension, so it doesn't require changes to the core code of PmWiki (yet).

About Wikiwyg

The two major browsers (Internet Explorer and Mozilla/Firefox) have a special mode that lets people edit HTML in their browser. Many content management systems use this mode to enable WYSIWYG editing of pages or parts of pages. You can also see this feature in action in Wordpress, Yahoo! Mail, Gmail, Google Docs, or many other services.

There are some libraries that make use of this feature to provide a rich word processing interface to a Web app. FCKEditor, TinyMCE, and Kupu are some of the best known.

Wikiwyg is a similar library with one key difference: it lets the wiki engine be blissfully unaware of the HTML that's happening on the client end. It uses JavaScript code to convert the HTML edited by the IE/Mozilla mode into Wiki text, and it lets the server-side code convert that wikitext back into HTML.


You can try this extension out by opening up the tarball and putting the files in the right places. You should be able to tell from the tarball where the files should go; note this tool is at a "pre-alpha" stage of development and may require an expert knowledge to be used successfully. Don't forget to add include_once("cookbook/wikiwyg.php"); in your /local/config.php file (just like any other recipe).


  • This is a pre-alpha release, mostly for review by experienced PmWiki admins and developers. It does not do a perfect job of maintaining your wikitext verbatim, and it may lose parts of your pages. Be forewarned, and don't use it on anything but a scratch, development wiki.
  • Most basic editing features should work.
  • Most features that require server-side information (like conditional blocks, tables-of-contents, or transclusion) won't work.
  • I need help! Please, take a look at the code and see if you can help fill out some of the unsupported wiki text.
  • I have a darcs repository here: . I really love getting darcs patches, so that's the fastest way to get code added.
  • To use this cookbook with the beeblebrox skin, users should comment/delete lines 15 to 30 in the /pub/skins/beeblebrox/gila.tmpl file.

Release Notes


Thanks for this very interesting recipe which I find far more powerfull than FCKEditor.
I successfully installed this recipe on a test wiki and here are some of the problems I noticed that are not listed in the TODO List provided in the archive :

  • Wiki links like "Main.Homepage?action=edit" work once but are modified as "Main.Homepage" after the first edition
  • Colors markups only work once %red% is deleted after the first edition
  • A new paragraph is often inserted in place of a single carriage return
  • Alignment markup like %center%, %left%, %right% has a strange behaviour (the previous lines are also affected)

I'll try to have a deeper look and see if I can bring you some information/patch to fix bugs. Good job Evan !


One word: Fantastic!
Limited, but at least it doesn't mess up with the wikitext and the installation is extremely easy, much more than FCKEditor The most important things I'm missing is a drop-down for the colors.


See Also

  • 17-May-2011: A fund drive has been setup to cover the costs of creating a WYSIWYG capability for PmWiki.
  • LiveEdit
  • Code mirror PmWiki syntax highlighter



Updates? I'm dying for this to be updated so I can integrate it in my wiki.

:Main update is that PM is coming to Montreal and I'm going to talk to him about the tool then. --EvanProdromou


Good start. But I have a big problem when re-editing a page with a table created like this || col1 || col2 ||:

Each || are transformed in one | and the table is then destroyed !
In wysiwig, the # is not maintained also.


Any updates now, did you talk with PM?


--- I too am hoping to install this if made available. In its present form it doesn't work for me at all at present. Any updates?



I installed it and the editing box is still the old version. Any ideas? - Ravenswood

- Never mind, I found it. In wikiwyg.php, there's a line

 wikiwords: $LinkWikiWords,

Since $LinkWikiWords is empty, this got turned into

 wikiwords: ,

which caused an error. I changed it to

 wikiwords: '$LinkWikiWords',

and it started working. - Ravenswood

- Correction. It's working in Firefox 1.5 but not IE. - R

- I've narrowed it down, but I don't know how to fix it. In IE, this routine:

 proto.get_edit_document = function() {
    return this.edit_iframe.contentWindow.document;

generates an error. If I turn on script debugging, it just says "Unspecified error" - R

I installed wikiwyg (and did not forget to add the include ... in my config.php). I could not manage to see the wysiywg-version. Do I have to add something to the action, like "?action=editwyg"? Walter Dietl

--- The same like above. I think it doesn't work at all. errorsys


Hello all. I've been away from this codebase for a while and haven't had time to work on it.

I'm very interested in support of WikiCreole in recent PmWiki betas and for my own use I will probably be revising this plugin to use WikiCreole. It's just a lot simpler and easier than full PmWiki syntax, and it's more likely that there's be some synergy with implementations in other wiki engines. I will probably try to set up a multi-syntax system, but the creole mode will probably "scratch my itch". --EvanProdromou

Doesn't work on konqueror either, but worked just fine on firefox. CarlosAB March 09, 2010, at 12:18 PM

User notes? : If you use, used or reviewed this recipe, you can add your name. These statistics appear in the Cookbook listings and will help newcomers browsing through the wiki.