Note boxes with icons
Contents
Description
NoteBox Plugin will render an HTML-DivContainer in different colors with different Icons.
The following containers are possible:
- [[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, make the following replacement: , -> \,. Everything in the second argument is interpreted as wiki markup, however a second macro cannot be embedded within the macro.
Bugs/Feature Requests
Existing bugs and feature requests for NoteBoxPlugin are here.
If you have any issues, create a new ticket.
Download / Source
Download the zipped source from here.
You can check out NoteBoxPlugin from here using Subversion, or browse the source with Trac (the anchor will only be present in Trac 0.12 or later, so you'll have to scroll to the appropriate location the page in earlier version of Trac.
Installation
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 as below then, restart web server, finally enable it at admin/general/plugins
easy_install http://trac-hacks.org/svn/noteboxplugin/0.11
If the plugin is installed and functioning correctly, you should see example of its use at WikiMacros#NoteBox-macro.
Example
Use either
- [[NoteBox(warn, my Text)]]
- [[NoteBox(tip, my Text)]]
- [[NoteBox(note, my Text)]]
where my Text can be replaced with your text.
Recent Changes
[11219] by rjollos on 01/31/12 08:38:31
Refs #9739: Minor refactoring and cleanup.
[11218] by rjollos on 01/31/12 08:33:20
Fixes #4207: Allow the width to be specified in pixels (e.g. 400px) or as a percentage of the page width (e.g. 50%).
[11217] by rjollos on 01/31/12 07:31:42
Refs #9739: (Refactoring) Inherit from WikiMacroBase rather than Component.
[11216] by rjollos on 01/31/12 07:20:20
Refs #4207: Added a third argument to specify the NoteBox width as a percent of the page width.
Note: This feature is experimental and subject to change before version 0.2 is released. It is likely that the width will be allowed to be specified in pixels as well as percent.
Author/Contributors
Author: gruenebe
Maintainer: AdoptingHacks request by rjollos is pending: #9738
Contributors:
Attachments
- notebox_preview_v0.1.png (14.9 kB) - added by gruenebe on 11/06/08 00:31:58.


