Features
- Supports security restrictions as described in Macro Security for Confluence.
- Supports capabilities for including data similar to other scripting macros.
- Supports find and replace for adjusting resulting output.
- Allows the user to restrict the usage of Javascript in the HTML macro (based on the configuration of Allow Javascript in the Configuration page). The Confluence page throws a rendering error if this parameter is not enabled, and javascript is inserted while using the macro.
Other HTML macros
- {html} and {html-include} macros shipped with Confluence. See the Confluence User Guide: http://confluence.atlassian.com/display/DOC:HTML Macro and http://confluence.atlassian.com/display/DOC:HTML Include Macro. These macros are disabled by default in Confluence, since it is a security exposure unless you only have trusted users on your site. The Confluence HTML macro must be disabled for the new HTML macro to be used.
- HTML Tag - a safer alternative to the standard {html} macro but does not allow for arbitrary HTML to be included.
By default, header content is excluded as it could interfere with Confluence page HTML. Use head=true to include anyway provided it does not disturb the content.
Parameters
Usage
Example - HTML from a file in the script folder in the Confluence home directory
{html:script=#example.html} {html}
Example - HTML from an attachement
{html:script=^example.html} {html}
Example - HTML put within {noformat} panel
{html:output=wiki|noPanel=true} Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aliquam fermentum vestibulum est. Cras rhoncus. {html}
Example - HTML from an URL
{html:script=#http://localhost/example.html} {html}
Example - use of CSS inline style sheet
{html} <P style="font-size: x-large; color: #8000"> Using inline style sheets - or is that inline styles? </p> {html}
Example - use of CSS external style sheet
{html} <LINK href="http://www.cssgarden.com/css/T22/keylime_0001.css" rel="stylesheet" title="default" type="text/css"></LINK> <H1>Absolute </H1> {html}
Note: Make sure that style sheet is available on a server and provide absolute URL reference to this external style sheet resource.