Expand Macro

Searching Help

The Expand Macro is a rewrite of the "Expand Text" macro.

Features:

  • Doesn't depend on any special JavaScript libraries that slow down page loads
  • Cleanly separates HTML, CSS and JavaScript code making for faster load times
  • Doesn't repeat JavaScript/CSS code if used multiple times on a page keeping load times quick
  • Bundled as a plugin, rather than a user macro making it easier to maintain
  • The header text is rendered as any other wiki markup
  • When printed, it automatically expands all sections
  • Works with HTML and PDF exports
  • Optional expanded parameter allows the text to be expanded by default
Parameter Name Required Default Value Notes
- - Header displayed next to the expand icon
expanded false Specifies whether the element should be expanded automaticaly. Possible values: true, false

Example

There is some hidden text below, click here to reveal it.
hidden text
The text below is expanded by default. Click here to minimize it.

This text is expanded by default as specified via the expanded=true parameter

Click here to reveal a nice table
Column 1 Collumn 2 Column 3
a b c
aa bb cc
aaa bbb ccc

Example Source

{expand:There is some hidden text below, click here to reveal it.}hidden text{expand}

{expand:The text below is expanded by default. Click here to minimize it.|expanded=true}
This text is expanded by default as specified via the {{expanded=true}} parameter
{expand}

{expand:Click *here* to _reveal_ a nice table !http://wikis.sun.com/images/icons/confimage.gif!}
||Column 1||Collumn 2||Column 3||
| a        | b        | c       |
| aa       | bb       | cc      |
| aaa      | bbb      | ccc     |
{expand}
Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.

Sign up or Log in to add a comment or watch this page.


The individuals who post here are part of the extended Sun Microsystems community and they might not be employed or in any way formally affiliated with Sun Microsystems. The opinions expressed here are their own, are not necessarily reviewed in advance by anyone but the individual authors, and neither Sun nor any other party necessarily agrees with them.

Copyright 1994-2009 Sun Microsystems, Inc.
Powered by Atlassian Confluence
Sun Guidelines on Public Discourse Privacy Policy Terms of Use Trademarks Site Map Employment Investor Relations Contact