This page is a snippet

For full information, see:

snippet

 

以下の例ではすべてのパラメータと本文を表示しています。

<ac: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">html/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:macro>

下記の 3 例はさまざまなオプションのパラメータを使用したコードブロック マクロの例です。

説明

Markup表示結果
本文にコードブロック マクロ、オプションのパラメータなし
<ac:macro ac:name="code">
	<ac:plain-text-body><![CDATA[this is my code]]></ac:plain-text-body>
</ac:macro>
this is my code
本文にコードブロック マクロ、オプションの言語パラメータが定義されている
<ac: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:macro>
this is my code

本文にコードブロック マクロとオプションのタイトル行数言語パラメータが定義されている

<ac: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:macro>
This is my title
this is my code
  • ラベルなし