This page is a snippet

For full information, see:

Snippet

 

The following example shows all parameters and a body:

<ac:structured-macro ac:name="code">
  <ac:parameter ac:name="title">This is my title</ac:parameter>
  <ac:parameter ac:name="theme">FadeToGrey</ac:parameter>
  <ac:parameter ac:name="linenumbers">true</ac:parameter>
  <ac:parameter ac:name="language">xml</ac:parameter>
  <ac:parameter ac:name="firstline">0001</ac:parameter>
  <ac:parameter ac:name="collapse">true</ac:parameter>
  <ac:plain-text-body><![CDATA[<b>This is my code</b>]]></ac:plain-text-body>
</ac:structured-macro>

Below are three examples of the Code Block macro with various optional parameters used.

Description

MarkupWhat you will get
Code block macro with a body and no optional parameters
<ac:structured-macro ac:name="code">
  <ac:plain-text-body><![CDATA[this is my code]]></ac:plain-text-body>
</ac:structured-macro>
this is my code
Code block macro with a body and the optional language parameter defined
<ac:structured-macro ac:name="code">
  <ac:parameter ac:name="language">html/xml</ac:parameter>
  <ac:plain-text-body><![CDATA[this is my code]]></ac:plain-text-body>
</ac:structured-macro>
this is my code

Code block macro with a body and optional title, line numbers and language parameters defined

<ac:structured-macro ac:name="code">
  <ac:parameter ac:name="title">This is my title</ac:parameter>
  <ac:parameter ac:name="linenumbers">true</ac:parameter>
  <ac:parameter ac:name="language">html/xml</ac:parameter>
  <ac:plain-text-body><![CDATA[this is my code]]></ac:plain-text-body>
</ac:structured-macro>
This is my title
this is my code
  • No labels