Raw Macro

Version 8.1 by Admin on 2021/03/17 18:43

cogDirectly output content in a target syntax
TypeJAR
CategoryMacro
Developed by

XWiki Development Team

Rating
0 Votes
LicenseGNU Lesser General Public License 2.1
Compatibility

Since 13.1RC1

Installable with the Extension Manager

Description

When content is parsed, an XDOM tree is created. Sometimes you don't have any way to express the content you wish in that XDOM tree and you only wish that your content is output as is, when the XDOM is then rendered in a given syntax. You can use the raw macro for this need.

Usage

From Wiki Syntax

{{raw syntax="<syntax id>"}}
content written in <syntax id>
{{/raw}}

Parameters definition

NameOptionalAllowed valuesDefault valueDescription
syntaxnovalid syntax idN/AThe id of the syntax in which the content is written (e.g. latex/1.0, xhtml/1.0)

Example

Example:

{{raw syntax="xhtml/1.0"}}
<form>
 <label for="fname">First name:</label><br>
 <input type="text" id="fname" name="fname"><br>
 <label for="lname">Last name:</label><br>
 <input type="text" id="lname" name="lname">
</form>
{{/raw}}

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-raw 13.1):

Tags:
    

Get Connected