Dokuwiki PlugIn : Note

⇒ lisez la version française

This plugin allows you to create nice «notes» like this in your dokuwiki pages :

2006-03-29: Thanks to Eric Hameleers and Christopher Smith (2006-03-24) for their great work (now merged into the plugin). Changelog :

  • allow note nesting,
  • fix the trimmed space problem,
  • fix the issue with protected modes (e.g. <code> & <file>) not being allowed within notes,
  • plug the security vulnerability which could allow malicious HTML or javascript to infiltrate your wiki,
  • make note types case independent (e.g. important, IMPORTANT & Important will all given an “important” note),
  • and better :
    • code efficiency,
    • code reading,
    • conformance to Doku's changes in plugin classes.


As of 2006-03-23, the plugin works with DokuWiki 2006-03-09. The documentation on this page has been updated to work for DokuWiki Release 2006-03-09, and revamped to be cleaner.

Download / Installation

Download the last version on my website and just unzip / untar it in lib/plugins. If you're lucky the archive will work with the plugin manager (i didn't test it but i don't see why it shouldn't work).

Old versions of this plugin used to require manual tuning of your template and CSS editing. Thanks to recent Dokuwiki changes and the contribution of Eric Hameleers, it's not the case anymore : the plugin is self contained and should work “out of the box” (i tested it on my doku install on

NB: Make sure you have ‘Allow embedded HTML’ turned on in your config or this will not work.

NB: 404 on above site, plugin available there: You can get it in ZIP-Format from here:

May 13 2007: Plugin extracted and re-zipped and available here: I was able to install it using the plugin manager. I haven't tried it yet, but at least you shouldn't get any errors when trying to use the plugin manager to install it. - Kenneth Udut

:!: As of 2007-01-03, the download from the author's website is working, again. The ZIP-formatted one was not working, but the .tar version from kokstitan was working. Both .tar version downloads came with .tar.tar extensions. That caused PKZip to think the files were damaged. I had to rename them to .tar.gzFIXME, and then PKZip was able to unzip them. — DGM2 2007-01-03 23:40


When you have it installed, use this :

This is my note ! Remember it !!
Warning ! You're about to lose your mind ;-)
The clues are in the images.
Beware of the dog when you open the door !!
This is my note ! Remember it !!

<note important>
Warning ! You're about to lose your mind ;-)

<note tip>
The clues are in the images.

<note warning>
Beware of the dog when you open the door !!

You can use the note keywords important, warning and tip. It is quite easy to add new types of notes if you know a bit of PHP and CSS.


Many thanks to the DokuWiki developers !!! I really enjoy using and hacking this wiki, since 2005-07. I love Doku :) Thanks to Stephane Chamberland and Carl-Christian Salvesen for their respective Side Notes and Graphviz plugins, i used them as great inspiration. Thanks to (in any order) :

For their interest in this plugin, their remarks, suggestions or patches.

Feel free to mail me if you encounter problems or need help. And don't hesitate to do it, as i don't browse the present page everyday…



I deleted all users comments because they addressed old issues that are not present anymore in the last version of the plugin. You can still see them if you browse the «Old revisions» of this page.


I don't think you should have a single entry pattern <note.*?>. I used two entry patterns as when specifying a note style, the style should be preceded by a space. So the two potential patterns are mutually exclusive - and since Dokuwiki parser doesn't allow or in patterns, two patterns are required.

  • <note>
  • <note\s+\S*\s*> (I simplified \S* to [a-zA-Z0-9]* for a reduced character set and to avoid potential complications if the > is placed on a subsequent line.

Your single pattern will match <notes>, <notepaper>, <notethiscouldbeanything>, which I would think is not desirable.

Christopher Smith 2006-03-30 02:10

I agree with this hint, but if would not match <note> because of the leading \s+ (whitespace needed). The whole term should be placed as optional (e.g. surrounded by (…)? )

Oliver Geisen 2006-04-06 13:54


Are you aware of any problems displaying the notes using Internet Explorer 6.0? I have a problem where the presentation of the boxes is poor compared to FireFox (which works perfectly on the same page). The problems are:

  1. Boxes are not rounded
  2. The icon (warning, important and note) are not allowing the background colour through (so I end up with a noticable colour variation over the box.

Do you know if this is a local implementation issue or something unique to IE?

Mark Butterworth 2006-05-30 11:30

1. Can't help with that.

2. Use transparent GIFs instead of the transparent PNGs, as IE has a buggy implementation for displaying the later.
Put them in 'lib/plugins/note/images' and edit 'lib/plugins/note/style.css' (change the 'background-image:' directives)
to replace PNGs with your GIFs. Make sure that the GIFs have the same permissions as the PNGs.

thanos 2006-05-30 14:05

MikeStammer 2006-06-28 13:08
- Make sure you have 'Allow embedded HTML' turned on in your config or this will not work right!

Matthias Pitzl 2006-08-30 09:07
- It's clear why the boxes are rounded only in browsers using the Gecko rendering engine: there's some proprietary CSS-Code used for the rounded edge effect. Opera also just shows a rectangle box.

alex 2006-12-16
- This is a real shame because rounded corners also don't show up in Safari.

I needed to clean up the cache with cacherevisionseraser to get the plugin working. — Konrad Bauckmeier 2006-07-06 15:38

I had the same problem. Perhaps this hint should be included to the install-instructions. Thx a lot for the plugin.

An other obvious method which worked for me was to delete the cache manually:
rm -rf <your doku root>/data/cache/*
Alex 2007-05-29

  1. <note> won't work inside numbered list, but <code>, <file> etc works. Probably some restriction in mode?

Petr Sindelar 2006-08-16 12:42

If you have a long table of contents and a <note> quite at the beginning of the page, the <note> will leave a lot of vertical space and only come after the end of the TOC.

Reinhold Kainhofer 2006-08-27 11:58

I solved this by surrounding the note <div>…</div> with <table style=“border: none;”><tr><td>…</td></tr></table>. Not particularly nice, but it works.
dab 2006-11-02 13:54

If you want the notes to have that nice layout also in the printout (currently, the notes are not marked in any
way in the printout), you have to copy the style.css over to print.css (which is the only style sheet used when

Reinhold Kainhofer 2006-08-28 13:28

This works for the formatting but I still can't get the icons to print. I have the option checked to print background colors & images. How can I get the icons to print?

Tim Constantine 2006-09-20 10:16

That is because you didn`t alter the path for the images, in the style css there should be the line: “background-image: url(images/important.gif);”
This path won`t work in the print.css however, because you are in another root directory. There are two possible ways to change this:
1. Copy the images folder to the directory your print.css is in (not the best way, but easy to do :D)
2. Alter the path in your print.css, it should then look something like: “background-image: url(../../../plugins/note/images/important.gif);”

Hope that works for you
Scarecrow 2006-12-01 13:07

On at least one page i can a huge blank space… I don't understand what's going on… Any hint/help is appreaciated. Weirdly enough, when logged on, that space desappears.

Pascal Giard 2006-10-04 11:48

Hi, Solution is to edit the style.css in plugins/note/ and remove clear: both; from it. — Ze 2006-12-07 13:46

Thanks alot, works like a charm! — Pascal Giard 2006-12-08 00:11

This will not work for IE6! Other ideas? — Robert Riebisch 2007-03-21 13:12

With latest version of dokuwiki (rc2006-10-19.tgz RC3) the plugin does not display the graphics at the notes.
Only the text and color. What can I do?

did you try to clear the cache? (navigator and server) i had similar issue at installation.
Thierry 2006-12-11 10:56
I had similar problems with the 2006-11-06 release, and the solution was similar, if not the same. I'm not clear on what Thierry meant about “navigator and server”, but deleting all the subfolders with a single character for a name under the DokuWiki/data/cache folder solved the problem I had. Olivier said it might be necessary to close the browser and open a new one, but that wasn't necessary in my case. — DGM2 2007-01-04 16:39

The download does not work. Does anyone have a copy>

The downloads work, now. See above — DGM2 2007-01-04 16:30

Hello, could you offer zip format of the plugin? Because the tgz file won't be repacked on Windows servers through the Plugin Manager.

Thank you for this handy plugin! — Roberto Ciang 2006-12-13 08:12

I put it up on my dyn-server as a ZIP: Get it from baierer 2006-12-13 11:08

I'm not sure if anyone else had similar problems, but I noticed with the latest DokuWiki and Firefox (not sure which is more responsible) I had to change the style.css file so that the ”.noteclassic” and so forth became “div.noteclassic”. Otherwise the notes didn't show up with any style.

I had the same problem but only with the arctic skin. Your workaround works great! Thank you.

SCRIPT.JS for Note Plugin by — Seth 2007-03-27 17:47

I have created a script.js file for the note plugin which is used to create a note picker in the toolbar (when editing). It is based on the javascript function to create a highlight toolbar in dokuwiki. I hope this becomes standard with the plugin in the future.

The script.js file is available at: and should be saved as /lib/plugins/note/script.js

You will also need to find an image for the toolbar, the one I am using is probably copywritten, I searched the net for 'note' as a small image and found a 16×16. The default image file is /lib/plugins/note/note.gif but can be changed easily in the javascript.

There is one bug: When you click the image for the dropdown the options are blank, you must hover over the blank area to show the name in the tooltip. It isnt so much that it is a bug but that I dont know too much javascript so I cant fix it. I am sure there is a way to actually show the way the note looks in the picker.

Bug within the plugin 2007-04-02 17:32
There's a bug in the syntax.php file, in the function render there's an inversion between <p> and </p>.
Philippe Gomes

Unable to install via plugin manager (2007-04-05)

I have to download it, and un-tar it.

Anyway, great plugin :)

I've seen the same bug as Philippe. I can only get notes to display if I edit syntax.php as he states.

However, with the notes plugin enabled, I get the following error whenever editing a page:- Warning: Cannot modify header information - headers already sent by (output started at C:\www\wiki\lib\plugins\note\syntax.php:1) in C:\www\wiki\inc\actions.php on line 295

Is this plugin incompatible with the latest dokuwiki, or is it perhaps incompatible with some other plugins ?

The notes leave a big space above when using the ACH template…

wiki/note.txt · 最后更改: 2007/05/20 11:09 (外部编辑)
除额外注明的地方外,本维基上的内容按下列许可协议发布:CC Attribution-Noncommercial-Share Alike 3.0 Unported
Recent changes RSS feed Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki