HTML Macro
Last modified by Admin on 2022/05/06 12:20
![]() | Allows inserting HTML or XHTML in wiki pages |
Type | JAR |
Category | |
Developed by | |
Rating | |
License | GNU Lesser General Public License 2.1 |
Bundled With | XWiki Standard |
Table of contents
Description
Allows inserting HTML or XHTML in wiki pages.
Usage
{{html wiki="true"|"false" clean="true"|"false"}}...{{/html}}
Parameters definition
Name | Optional | Allowed values | Default value | Description |
---|---|---|---|---|
wiki | yes | true/false | false | Indicate if the wiki syntax (including other macros) inside the macro is evaluated or not. If true then the content of the macro is parsed as markup content (written in the syntax of the current page) and rendered back as XHTML in the macro. Then the whole content is output as XHTML. |
clean | yes | true/false | true | Indicate if the user input must be converted to valid XHTML or not. 14.1+ Cleaning is adapted according to the HTML version used in the rendering process, defaulting to HTML 5. This means that in most cases tags like <video> are supported. |
Examples
Interpreted wiki syntax
{{html wiki="true"}}
<table>
<tr>
<td>
* listitem
</td>
</tr>
</table>
{{/html}}
<table>
<tr>
<td>
* listitem
</td>
</tr>
</table>
{{/html}}
Result
|
Escaped wiki syntax
{{html}}
**some escaped text**
{{/html}}
**some escaped text**
{{/html}}
Result
**some escaped text**
Prerequisites & Installation Instructions
We recommend using the Extension Manager to install this extension (Make sure that the text "Installable with the Extension Manager" is displayed at the top right location on this page to know if this extension can be installed with the Extension Manager).
You can also use the manual method which involves dropping the JAR file and all its dependencies into the WEB-INF/lib folder and restarting XWiki.
Dependencies
Dependencies for this extension (org.xwiki.rendering:xwiki-rendering-macro-html 14.3.1):
- org.xwiki.commons:xwiki-commons-xml 14.3.1
- org.xwiki.rendering:xwiki-rendering-syntax-xhtml 14.3.1
- org.xwiki.rendering:xwiki-rendering-syntax-annotatedxhtml 14.3.1
- org.xwiki.rendering:xwiki-rendering-syntax-html5 14.3.1
- org.xwiki.rendering:xwiki-rendering-syntax-annotatedhtml5 14.3.1
- org.xwiki.rendering:xwiki-rendering-api 14.3.1
- org.xwiki.rendering:xwiki-rendering-transformation-macro 14.3.1