mindmap macro setup |
- Get the Freemind browser applet from here Freemind at Sourceforge
- Create a page in your confluence that can be access by an anonymous user and attach the freemindbrowser.jar to it.
- Login as Confluence Administrator and create a new user macro
- Put the following code into the template textbox:
#set($width= $param1) #if (!$width) #set ($width=600) #end #set($height= $param2) #if (!$height) #set ($height=450) #end #set($attachmentUrl="$action.getGlobalSettings().getBaseUrl()$content.getAttachmentNamed($param0).getDownloadPathWithoutEncoding()") <applet code="freemind.main.FreeMindApplet.class" archive="http://your.company.confluence.server/download/attachments/2687383/freemindbrowser.jar" width="$width" height="$height"> <param name="type" value="application/x-java-applet;version=1.4"> <param name="scriptable" value="false"> <param name="modes" value="freemind.modes.browsemode.BrowseMode"> <param name="browsemode_initial_map" value="$attachmentUrl"> <param name="initial_mode" value="Browse"> <param name="selection_method" value="selection_method_direct"> </applet>Just replace http://your.company.confluence.server/download/attachments/2687383/freemindbrowser.jar with the url of the attached freemindbrowser.jar
Now you can use the macro with the following syntax to embed freemind mindmaps:
{mindmap:<attachment_filename>[|<width>[|<height>]]}
Example:
{mindmap:my_mindmap.mm|650|500}
Enjoy it! :-)