Tag Archives: link

Wiki markup in Moodle and Mediawiki

Some have asked whether wiki markup is dead, but when editing a wiki or teaching others to do so, I usually prefer to use markup tags to format text and create links. Why? Because the WYSIWYG editors tend to be:

  • a bit unreliable and don’t seem well-supported across all browsers.
  • likely to cause problems with boundaries – eg further editing next to a list item can cause new text to be mistakenly inserted into the list. This can cause major confusion for new users. Since often the only solution is to edit the source anyway, knowing how to do so becomes an essential skill.
  • not very intuitive to use – eg some of the buttons in the Mediawiki toolbar below are obvious, others much less so:

wysiwyg editor toolbar

There are some important differences between the markup used by various wiki systems. Because I use a range of wiki software (Mediawiki and PMWiki for my own sites, Moodle wiki and PBWiki for some of my courses) I find I sometimes use the wrong markup for the one I’m using and need to refer to the documentation.

Here’s a handy table comparing the markup for a few common functions of Mediawiki and Moodle wiki:

Function Mediawiki Moodle wiki
Small heading ====heading==== !heading
Medium heading ===heading=== !!heading
Large heading ==heading== !!!heading
Internal link [[pagename | text to display]] [text to display | pagename]
External link [http://www.verso.co.nz text to display] [text to display | http://www.verso.co.nz]
Bold ”’bold text”’ __bold text__
Line break <br> %%

There are other differences between the markup of various functions, of course, but in my view headings and links are the most significant because of their semantic purpose.

WordPress linking causes validation problem

Inserting a link in WordPress 2.5.1 can cause a validation problem. The problem arises when you insert a link using the Visual editor mode and include a title attribute, generally regarded as highly desirable for reasons of accessibility and promoting your content. The HTML for such a link looks like this:

<a title="Paul Left's blog" href="http://www.verso.co.nz">

W3’s HTML validator doesn’t like this tag: it seem that having the title attribute before the href attribute is invalid code according to the WordPress document type. So the link code should be:

<a href="http://www.verso.co.nz" title="Paul Left's blog">

I click on the HTML tab and go through the code prior to publishing and edit any link tag to ensure the title attribute follows the href attribute. It’s a minor nuisance but there doesn’t appear to be any way to configure WordPress to avoid this. I’m using Firefox and Mac OSX but the same problem happens using Window XP so I assume it’s platform-independent.

The significance of the validation issue is open to heated debate but it does seem desirable to post pages with valid code where possible.