...
...
...
...
...
...
...
...
...
...
Table of Contents | ||||||||
---|---|---|---|---|---|---|---|---|
|
...
Features
...
Features
- Render HTML content from within the macro body, attachments, or remote locations using URLs.
- Allows malformed HTML to be cleaned so content displays properly with JTidy.
- Supports find and replace for adjusting resulting output.
- Allows the user to restrict the usage of Javascript in the
...
- Html-bobswift 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.
- Supports capabilities for including data similar to other scripting macros.
- Supports security restrictions as described in CMSP.
Info | |||||
---|---|---|---|---|---|
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
|
Other HTML macros
- Confluence comes with two native macros: {html} and {html-include}. These macros are disabled by default in Confluence, since it is a security exposure unless you only have trusted users on your site. The native Confluence HTML
...
- macros must be disabled
...
- to use the Html-bobswift macro of HTML for Confluence.
- HTML Tag - a safer alternative to the standard {html} macro but does not allow for arbitrary
...
- HTML to be included.
Tip |
---|
By default, header content is excluded as it could interfere with a Confluence page html. Use head=true to include anyway 's HTML code. Enable Include head section HTML to include the header tag, provided it does not mess up the HTML content. |
Parameters
...
Macro Browser Label | Default | Description | Macro Parameter |
---|
...
Format | html |
...
Specify how the output is treated. The options are as follows:
|
...
|
...
|
...
|
...
|
...
|
...
| output | ||||
Profile | Enter the profile name to access the files to be rendered. Profiles contain a basic set of parameters used to access a remote location such as the type of URL, user credentials, and so on. Refer to this link to know more about profile configuration and this link for tutorials.
| profile | |||
Location of HTML data | macro body | Enter the location that contains the HTML file to be rendered. If a location of data is specified, the included data |
...
follows the body data (if any).
|
...
|
...
|
...
|
...
| script | |||||
Find regex patterns |
...
Enter a comma-separated list of regex patterns to |
...
dynamically update the output content. Refer to this article for more information about regular expressions. Example: (href=)(/display) |
...
find |
Replacement strings |
...
Enter a comma-separated list |
...
of positions to |
...
search for patterns |
...
- Example: $1$base_url$2
...
in the output content. Note that the positions are indexed beginning at "1". If a comma is a part of the search, use single quotes (') around it. Example: http://www.google.com/$1 | replace |
File encoding | system default |
...
Specify the encoding for an external file, if different from the system default handling. Example: UTF-8. |
...
encoding |
...
Select to use JTidy |
...
false | Enable this option to use JTidy to ensure the HTML is well formed |
...
to prevent page display problems. |
...
tidy |
Remove conflicting tags |
...
true | Disable this option to surround the HTML with an iframe. By default, this parameter allows the display of HTML content in a Confluence page without an iframe. |
...
The html, body, and (optionally) the head tags including their corresponding ending tags are removed so that it displays properly on a Confluence page. |
...
clean |
Include head section HTML |
...
false | Enable this option to retain all the other tags from the |
...
header section and treat them as regular body content. |
...
This is useful for retaining style information in particular. By default, the head tag is always removed. Valid only if Remove conflicting tags is enabled. |
...
head |
...
Omit panel when output is wiki |
...
false | Enable this option to hide the panel around the rendered content. This parameter provides a way of setting the nopanel parameter of the noformat macro. |
...
Valid only if Format is set to wiki. |
...
noPanel |
...
Width of iframe |
...
500 | Enter the width for the iframe that displays the HTML content. Valid only if Remove conflicting tags is disabled. | width | |
Height of iframe |
...
500 | Enter the height for the iframe that displays the HTML content. Valid only if Remove conflicting tags is disabled. | height | |
URL user |
...
Enter the user name to be used for URL access |
...
to HTML files. |
...
user |
URL user password |
...
Enter the user password to be used for URL access |
...
to HTML files. |
...
password |
Timeout in milliseconds |
...
Enter time in milliseconds to wait until the URL connection times out before getting data. Use this to increase time needed for slow connections |
...
Usage
...
. Note that if a zero is given, the connection may wait indefinitely. | timeout |
Info | ||
---|---|---|
| ||
|
Usage examples
HTML from a file in the Confluence home/script directory
No Format |
---|
{html:script=#example.html} {html} |
...
HTML from an
...
attachment
No Format |
---|
{html:script=^example.html} {html} |
...
HTML put within {noformat} panel
No Format |
---|
{html:output=wiki|noPanel=true} Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aliquam fermentum vestibulum est. Cras rhoncus. {html} |
...
HTML from
...
a URL
No Format |
---|
{html:script=#http://localhost/example.html} {html} |
...
Use of CSS inline style sheet
No Format |
---|
{html} <P style="font-size: x-large; color: #8000"> Using inline style sheets - or is that inline styles? </p> {html} |
...
Use of CSS external style sheet
No Format |
---|
{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 the absolute URL reference to this external style sheet resource.
Anchor html_57_html_helpfulResources html_57_html_helpfulResources
Helpful resources
html_57_html_helpfulResources | |
html_57_html_helpfulResources |
- How to use URLs in the HTML for Confluence macros
- Key concepts to understand how to link and render HTML content from other sources