Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Is there a way to insert an HTML checkbox in Mediawiki syntax?

<input> doesn't appear on their list of blessed tags, so I can't just insert it.

(FWIW, this is for a private documentation page which is a checklist, and I want to keep track of where I am as I go through it.)

share|improve this question

These tags are just free-form wiki text, like markdown on SO, and are provided for formatting but not input. To add input html elements, or forms, use one of the MEdiawiki extensions, such as semantic forms or simple forms. Check this URL out for an overview of how form content is handled in Mediawiki.

Good luck.

share|improve this answer

This is a quick way to add something like a checkbox if it fits you:

<span style="font-size:21px">□</span> 

Basically, it uses the 'hollow medium square' character "□" which is similar to a checkbox, but it is too small in its original form, so I had to apply some CSS to enlarge it.

To check it, replace it with a 'tick' mark. (✓, ✔, ☑, etc.)

Adjust the values to your needs.

share|improve this answer
Here's an slightly larger alternative to add to the answer. It's called 'white medium square': ◻ – wandersick Apr 24 '13 at 14:57

I just found another way to do it. It involves editing your mediawiki source, and depending which version you have, may not work just the same. This is for 1.15.3.

In the file sanitizer.php, near the end of the function setupAttributeWhitelist() add this line to the list

'input'      => array('type'),

Then find the function removeHTMLtags and add this to the end of the $htmlsingle (and for 1.19.4 and maybe an intermediate version, the $htmlsingleonly) array:

, 'input'
share|improve this answer
I upgraded to 1.22.4 and it stopped working. I'd forgotten that I'd done this tweak, so I've just come across my own answer! I've also updated it. – paulmorriss Mar 21 '14 at 10:00

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .