Miln Checkbox - Trac plugin

Checkbox converts brackets into graphical checkboxes within Trac wiki pages.

Miln Checkbox

Miln Checkbox converts brackets into graphical checkboxes within Trac wiki pages.

Download Miln Checkbox

A python (py) file of ~1KB.

Miln Checkbox is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License.

What it does

Miln Checkbox matches pairs of square brackets within your Trac wiki pages. The brackets need to brace one of the following characters be matched: ’ ’ (space), ‘+’, ‘x’, or ‘X’.

Miln Checkbox uses the following regular expression to perform the matching: \[[ xX+]\]

The following wiki formatted list contains four pairs of brackets that will be matched by Miln Checkbox:

 * [ ] space within brackets
 * [x] lowercase x within brackets
 * [X] uppercase X within brackets
 * [+] plus within brackets

When matches are found, the brackets are replaced with checkboxes:

The HTML input checkboxes are disabled to avoid users thinking the elements are interactive and persistent.

How to install

There are two ways to install Miln Checkbox. You can manually copy the file or use Trac’s web interface.

Install with Trac Admin

Miln Checkbox is a single python file. This means you can use Trac’s web interface to upload and install the plugin.

  1. As an administrator, visit your Trac web interface;
  2. Click on Admin at the top-right of your Trac navigation bar;
  3. Click on Plugins under “General”, in the “Administration” menu on the left;
  4. Click on Choose File within the “Install Plugin:” box;
  5. Select the milncheckbox.py file from your computer; you can download this file from the link above;
  6. Click on Install.

After a few seconds, Miln Checkbox will be uploaded and installed. The new wiki mark-up is available immediately.

Install manually

You can install Miln Checkbox manually through the command line or a file manager on the server hosting Trac.

Copy the milncheckbox.py file, downloaded from above, into your Trac plugins directory.

Once copied, the new wiki mark-up is available immediately.

Available options

Miln Checkbox supports optional configuration options. Options are set within your Trac installation’s config.ini file.

[miln-checkbox]
class = <CSS class name>
type = html …or… unicode

class: Cascading Style Sheet (CSS) class name to apply to HTML checkboxes. Empty by default.

type: Type of checkbox to render; either html to render an HTML checkbox using the input tag, or unicode to render unicode based ballot box characters ☐ and ☑. HTML by default.