Note boxes with icons
This macro will render an HTML div-container in its own color and its own icon. The following containers are supported:
- [[NoteBox(warn, my Text)]]
- will render a red div-container with the given Text and a stopsign-image
- [[NoteBox(tip, my Text)]]
- will render a green div-container with the given Text and a lightbulb-image
- [[NoteBox(note, my Text)]]
- will render a blue div-container with the given Text and a notepaper-image
It will look like this:
The parse_args function from the Trac API is used to parse the input, therefore commas must be escaped with a backslash (\). That is, the following replacement must be made: , -> \,. Everything in the second argument is interpreted as wiki markup, however, a second macro cannot be embedded within the macro.
See also: WikiExtrasPlugin
If you have any issues, create a new ticket.
Download the latest revision from here.
For detailed installation steps, please refer to t:TracPlugins. The following steps should work for most Trac configurations:
- Unzip the code and type:
python setup.py install
or use easy_install:
- Restart the web server.
- Enable it at admin/general/plugins.
If the plugin is installed and functioning correctly, you can see examples of its use at WikiMacros#NoteBox-macro.
- 13676 by rjollos on 2014-02-19 11:51:59
Tagged version 1.0.
- 13675 by rjollos on 2014-02-19 11:50:48
Trimmed whitespace using reindent.py.
- 13600 by rjollos on 2014-01-21 07:06:55
1.0: Released version 1.0. Fixes #9907.
- Renamed class from NoteBox to NoteBoxMacro.
- Strip whitespace from arguments.