Note boxes with icons

Description

The NoteBox macro 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.

See also: WikiExtrasPlugin

Bugs/Feature Requests

Existing bugs and feature requests for NoteBoxMacro are here.

If you have any issues, create a new ticket.

Download

Download the latest revision from here.

Source

You can check out NoteBoxMacro from here using Subversion, or browse the source with Trac.

Installation

For detailed installation steps, please refer to t:TracPlugins. The following steps should work for most Trac configurations.

  1. Unzip the code and type
    $>python setup.py install
    
  2. or use easy_install as below then, restart web server, finally enable it at admin/general/plugins
    easy_install http://trac-hacks.org/svn/noteboxmacro/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

[11779] by rjollos on 07/25/12 10:11:21

Fixed author email address.

[11778] by rjollos on 07/25/12 10:08:06

Added additional author to README and setup.py.

[11777] by rjollos on 07/25/12 09:46:39

Added setup.cfg.

[11461] by rjollos on 04/09/12 05:35:38

Refs #9907: Minor refactoring.

Author/Contributors

Author: gruenebe
Maintainer: rjollos
Contributors:

Attachments