Wiki Mode Help

Wiki Mode Help

This page provides help and documentation about the Wiki mode in Alpha. One of its main purposes is to help users in determining the editing method corresponding to a particular Wiki site.

Wiki mode is part of the standard distribution of Alpha: if you have a recent version of Alpha, then you have Wiki mode. Wiki mode installs a menu and some mode specific editing capacities. This is obtained by selecting Wiki menu from the Config --> Global Setup --> Menus... menu item in Alpha. Alternativley it is automatically installed when a window is opened in Wiki mode.

The most popular feature of wikis is the fact that any user can participate in the contents of the pages, modify them, add his own contribution etc. This is concretely achieved by editing the page: a page normally has a link (generally found at the bottom and/or at the top) which lets you display the contents of the window in editing mode. This is where Alpha, as a text editor, comes in very handy.

This page contains the following topics:

Managing projects

The Wiki menu lets you define projects. A project is a set of information concerning a particular wiki site: its location on the web, its editing method (see below) and the basic formatting rules. The Wiki menu provides all the necessary commands to manage the projects: New Project, Edit Project, Rename Project, Delete Project.

When you edit a project, a dialog window is displayed in which you can specify various settings. For instance, Wiki mode comes by default with two projects called Tcl and AlphaTcl:

Cloning settings

A nice feature is the possibility of cloning settings from another project. When you create a new project, a dialog window first asks you to give it a name: this is the name which will be used by the mode to designate this project. You can use any name without any blank space. All the projects are listed in the Current Wiki submenu. The name does not have necessarily to be the same as the name of the site; it is internal to Wiki mode.

There is a popup menu in the same dialog window which lets designate a project whose settings you want to clone: this avoids the hassle of typing again and again very similar formatting rules, provided you know that the new project makes use of the same rules as an already existing one. This won't prevent you from making modifications later. If you do not want to clone a project, choose default in the popup menu.


One of the problems you rapidly encounter while navigating on a Wiki site is that you meet all kinds of interesting pages jumping from a link to the other and then if you want to find a page again, you do not remember which route led you to its location. Wiki mode has a mechanism to store, on a per project basis, the addresses of your favorite pages.

When a wiki page is displayed in your browser, you can switch to Alpha and select the Add to Favorite Pages menu item: the title of this page will be added to the Wiki Favorite Pages submenu. Later you can select a favorite page from this submenu: Alpha will automatically switch to the browser and ask it to display this page. Alpha will remember your favorites from one session to the next one.

Editing a Wiki page in Alpha

What's great with Wikis is that you can edit the pages to add contents. For instance try the link called Edit Wiki Mode Help at the bottom of this page then come back here.

Wiki mode allows you to edit the pages in Alpha (rather than in your browser). With the Edit Wiki page menu item, you get a new window in Alpha containing the raw text of the page written using the Formatting Rules. Technically, for Alpha to be able to do that, it must download the edited version of the page and extract the part containing the raw text.

There are many implementations of the Wiki system. This makes it difficult to develop the editing capacity of Wiki Mode in Alpha because different Wiki systems have different conventions to designate the edited version of a displayed Wiki page. To be able to edit a Wiki page in Alpha, one must specify an appropriate editing method.

For example, the Wiki system used on the present Wiki as well as on the Tcl'ers Wiki [3] is called Wikit and adopts the following convention:

In this case, the editing method is a rule which lets you transform '14.html' to '14@'. This is handled inside Wiki mode by a proc called Wiki::buildEditPageUrl which looks for the editing method and applies it.

Wiki Mode comes with a lot of preset editing methods and it is very likely, if you add a new Wiki site to the menu, that its editing method is one of them. The remaining of this section contains explanations on how these methods work and instructions on how to add new methods to the already existing ones.

 ''Editing methods'' are stored in an internal array variable called Wiki::editingMethods

and are built using the regsub syntax: you just have to specify the search string and the replacement string as a two-elements list. In the previous example, the search string would be:


and the replacement string would be:


If we decide to call this editing method Wikit, the declaration will just be like this:

    set Wiki::editingMethods(Wikit) [list {([0-9]+)\.html} {\1@}]

More generally:

    set Wiki::editingMethods(<name_of_the_method>) [list {<searchstring>} {<replacestring>}]

So, adding a new editing method means:

  1. determining the convention to build the name of the edited text file
  2. translating it to a rule using the regsub syntax, i-e determining the search string representing the name of the displayed text file and the replacement string
  3. setting the Wiki::editingMethods variable with an instruction like as shown above
  4. this instruction can be added to your main prefs file or to your Wiki mode specific prefs file. Wiki mode comes with almost 20 predefined methods. They are stored in the file /Tcl/Modes/Wiki Mode/wikiMethods.tcl which is automatically sourced when Wiki mode is invoked.

Note that all these rules are relative to the base url of the Wikit declared as the Home Page in the Edit Projects… dialog. In the previous example, the base url is You do not have to worry about the base part of the url: the editing method is supposed to convert the end of the url, so the search string must represent the end of the url i-e the part which will be modified. The base part is not affected.

See below, in the Editing methods section, a certain number of predefined declarations and add new ones if the method of your favorite Wiki engine is missing there.

Tip: if you want to guess what is the editing mode for a given Wiki, just go to one of its pages, note its url, choose Edit this page (or any equivalent command at the bottom of the displayed Wiki page), note the url of the edited page and compare both urls in order to build the editing rule. Ask for help on the Alpha-Users mailing list if you are uncomfortable with the regsub syntax ( ).

If you do not want to specify the editing method for a given Wiki, you can declare it as undefined in the Edit Projects… dialog: this will disable the editing capacity for this Wiki.

Editing methods

This section is intended as a repository for editing methods. Please edit and add new methods if you found a Wiki engine whose type is not in the list below. Ask here for help if you don't know how to determine the editing method for a particular engine (this requires a bit of knowledge of the regsub syntax).

From the user's side, a method is attached to a particular Wiki site in the settings dialog window (choose the Edit Projects menu item. All declared methods are listed in the 'editing method' popup menu.

Wikit [4] :

    set Wiki::editingMethods(Wikit) [list {([0-9]+)(\.html)?} {\1@}]

ApacheMiniWiki [5] :

    set Wiki::editingMethods(ApacheMiniWiki) [list {([^/\?]*)(\?[^/]*)?} {(edit)/\1}]

AwkiAwki [6] :

    set Wiki::editingMethods(AwkiAwki) [list {/([^/]*)} {?edit=true\&page=\1}]

ChiqChaq [7] :

    set Wiki::editingMethods(ChiqChaq) [list {\?(.*)title=(.*)} {\1edit=\2}]

Cliki [8] :

    set Wiki::editingMethods(Cliki) [list {/([^/]*)} {/edit/\1}]

JSPWiki [9] :

    set Wiki::editingMethods(JSPWiki) [list {Wiki.jsp\?([^/]*)} {Edit.jsp?\1}]

MiniRubyWiki [10] :

    set Wiki::editingMethods(MiniRuby) [list {/([^/]*)} {wiki?edit=\1}]

MoinMoin [11] :

    set Wiki::editingMethods(MoinMoin) [list {/[^/]*} {&?action=edit}]

OpenWiki [12] :

    set Wiki::editingMethods(OpenWiki) [list {\?([^/]*)} {?p=\1\&a=edit}]

PhpWiki [13] :

    set Wiki::editingMethods(PhpWiki) [list {([^/]*)} {&?action=edit}]

SeedWiki [14] :

    set Wiki::editingMethods(SeedWiki) [list {[^/]*} {&\&edit=yes}]

TinyWiki [15] :

    set Wiki::editingMethods(TinyWiki) [list {[^/]*} {&\&action=edit}]

TWiki [16] :

    set Wiki::editingMethods(TWiki) [list {/view/TWiki/(.*)} {/edit/TWiki/\1}]

UseModWiki [17] :

    set Wiki::editingMethods(UseModWiki) [list {\?(.*)} {\&id=\1}]

Wiiski [18] :

    set Wiki::editingMethods(Wiiski) [list {/view/User/([^/]*)} {/edit/User/\1}]

Wikipedia [19] :

    set Wiki::editingMethods(Wikipedia) [list {/wiki/([^/]*)} {/w/wiki.phtml?title=\1\&action=edit}]

Wiki Type Framework (WTFW) [20] :

    set Wiki::editingMethods(WTFW) [list {([^/]*)} {&\&op=edit}]

WikiWay [21] :

    set Wiki::editingMethods(WikiWay) [list {\?([^/]*)} {?pact=Edit+this+page\&paref=\1}]

WikiWest [22] :

    set Wiki::editingMethods(WikiWest) [list {\?([^/]*)} {?pact=Edit+this+page\&paref=\1}]

WikiWikiWeb [23] : The first Wiki system ever written used the WikiWikiWeb. :

    set Wiki::editingMethods(WikiWikiWeb) [list {\?(.*)} {?edit=\1}]

WikkiTikkiTavi [24] :

    set Wiki::editingMethods(WikkiTikkiTavi) [list {/[^/]*} {index.php?action=edit&page=\1}]

ZWiki [25] :

    set Wiki::editingMethods(ZWiki) [list {[^/]*} {&/editform}]

Feature requests

Please edit and add wishes concerning new features to introduce in the Wiki mode in Alpha.

Category Features

Category Modes