When upgrading from Confluence 3.x to Confluence 4.x, the underling storage format for your content will be migrated from a wiki markup-based format to a new XHTML-based format. This page highlights the differences between these two type of markup.

Still considering

  • Provide an XSD - "an XSD could make on the fly validation for persons having an editor supporting it (E.g. Visual Studio), and since an XSD would be a way to validate your input. CONF-24884 - Getting issue details... STATUS

Intended Audience

This page is intented for developers and advanced users who need to interpret and edit the underlying markup for a Confluence page or blog post.

Content Categories

マクロ

Below are some examples of the source markup for common Confluence macros. Rather than document the source for every macro included in Confluence, the goal of this page is to give you guidelines and examples of how the macros are defined within the Confluence storage format.

情報マクロ

The info macro is a good example of a macro that accepts a rich text body. Below are three examples of the info macro with various optional parameters used.

Format TypeIn Confluence 3.5 and belowIn Confluence 4.0 and above表示結果

定義済み本文ありおよびオプション パラメーターなしの情報マクロ

{info}this is _important_ information{info}
<ac:macro ac:name="info">
	<ac:rich-text-body><p>this is <em>important</em> information</p></ac:rich-text-body></ac:macro>

This is my title

 this is important information

定義済みの本文およびオプションタイトルパラメーターありの情報マクロ

{info:title=This is my title}
this is _important_ information
{info}
<ac:macro ac:name="info">
	<ac:parameter ac:name="title">This is my title</ac:parameter>
	<ac:rich-text-body><p>this is <em>important</em> information</p></ac:rich-text-body>
</ac:macro>

This is my title

 this is important information

定義済みの本文とオプションタイトルおよびアイコンパラメーターありの情報マクロ

{info:title=This is my title|icon=false}
this is _important_ information
{info}
<ac:macro ac:name="info">
	<ac:parameter ac:name="icon">false</ac:parameter>
	<ac:parameter ac:name="title">This is my title</ac:parameter>
	<ac:rich-text-body><p>this is <em>important</em> information</p></ac:rich-text-body>
</ac:macro>

This is my title

 this is important information

Expand macro with default macro parameter
{expand:test title}
this is _important_ information
{expand}
<ac:macro ac:name="expand">
	<ac:default-parameter>test title</ac:default-parameter>
</ac:macro>

 this is important information

コー​ド ブロック マクロ

The code block macro is a good example of a macro that accepts a plain text body. Below are three examples of the code macro with various optional parameters used.

Format TypeIn Confluence 3.5 and belowIn Confluence 4.0 and above表示結果
Code block macro with a body and no option parameters
{code}this is my code{code}
<ac:macro ac:name="code">
	<ac:plain-text-body><![CDATA[this is my code]]></ac:plain-text-body>
</ac:macro>
this is my code
Code block macro with a body optional language parameter defined
{code:language=html/xml}this is my code{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

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

{code:language=html/xml|title=This is my title|linenumbers=true}this is my code{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

The body of a plain text macro must be inside a CDATA block. So the following is not sufficient:

<ac:plain-text-body>text</ac:plain-text-body>

The correct usage is:

<ac:plain-text-body><![CDATA[text]]></ac:plain-text-body>
目次マクロ

The table of contents macro is a good example of a macro that does not accept a body. Below are two examples:

Format TypeIn Confluence 3.5 and belowIn Confluence 4.0 and above表示結果
Table of contents macro with no parameters
{toc}
<ac:macro ac:name="toc" /> 
Table of contents with optional minLevel and type parameters defined
{toc:type=flat|minLevel=3}

 

 

<ac:macro ac:name="toc">
	<ac:parameter ac:name="minLevel">3</ac:parameter>
	<ac:parameter ac:name="type">flat</ac:parameter>
</ac:macro>
 

 

見出し

Format TypeIn Confluence 3.5 and belowIn Confluence 4.0 and above表示結果 
Heading 1

h1. Heading 1

<h1>見出し 1</h1> 

ドキュメント用テーマでは下線が付きます
Heading 2
h2. 見出し 2
<h2>見出し 2</h2> 

ドキュメント用テーマでは下線が付きます
Heading 3
h3. 見出し 3
<h3>見出し 3</h3> 

 
Heading 6
h6. 見出し 6
<h6>見出し 6</h6>

 

テキスト効果

Format TypeIn Confluence 3.5 and belowIn Confluence 4.0 and above表示結果
より強い強調/太字
*太字*
<strong>強調太字テキスト</strong>
太字
強調
_強調_
< em > 斜体テキスト </em >
強調
取り消し線
-取り消し線-
<span style="text-decoration: line-through;">取り消し線</span>
取り消し線
下線
+下線+
<u>下線</u>
下線
上付き
^上付き^
<sup>上付き</sup>
上付き
下付き
~下付き~
<sub>サブスクリプト</sub>
下付き
等幅
{{等幅}}
<code>等幅</code>
monospaced
ブロック引用
bq. ブロック引用

または

{quote} 
block
quote
{quote}
<blockquote><p>block quote</p></blockquote>
ブロック引用
文字の色
{color:red}赤い文字{color}
<span style="color: rgb(255,0,0);">赤字のテキスト</span>
赤い文字

テキストの改行

Format TypeIn Confluence 3.5 and belowIn Confluence 4.0 and above表示結果
新しい段落
Paragraph 1
(empty line)
Paragraph 2 
<p>Paragraph 1</p>
<p>Paragraph 2</p>

段落 1

段落 2

改行
行 1 \\ 行 2
行 1 \\ 行 2

注意: これはエディタで Shift + Return/Enter キーを使用して作成したものです

行 1
行 2 
水平線----
<hr />

— 記号

---
&mdash;

– 記号--
&ndash;

リスト

Format TypeIn Confluence 3.5 and belowIn Confluence 4.0 and above表示結果
Unordered List - Round Bullets
* 番号なし箇条書き項目
<ul>
  <li>round bullet list item</li>
</ul>
  • 番号なし箇条書き項目
Unordered List - Square Bullets
- Square bullet list item
<div>
  <ul style="list-style-type: square;">
    <li>square bullet list item</li>
  </ul>
</div> 
  • Square bullet list item
番号付きリスト
# 番号付き箇条書き項目
<ol>
  <li>numbered list item</li>
</ol> 
  1. 番号付き箇条書き項目
Format TypeIn Confluence 3.5 and belowIn Confluence 4.0 and above表示結果
別の Confluence ページにリンク
[別の Confluence ページにリンク|ページタイトル]
<ac:link>
 <ri:page ri:content-title="Page Title" />
 <ac:plain-text-link-body>
   <![CDATA[Link to another Confluence Page]]>
 </ac:plain-text-link-body>
</ac:link> 
別の Confluence ページにリンク
添付ファイルへのリンク
[Link to an attachment^atlassian_logo.gif]
<ac:link>
 <ri:attachment ri:filename="atlassian_logo.gif" />
 <ac:plain-text-link-body>
   <![CDATA[Link to a Confluence Attachment]]>
 </ac:plain-text-link-body>
</ac:link>


添付ファイルへのリンク
外部サイトにリンク
[Atlassian|http://www.atlassian.com/]
<a href="http://www.atlassian.com">Atlassian</a>
アトラシアン
Anchor link
[アンカー リンク|ページタイトル#アンカー名]
<ac:link ac:anchor="Anchor Link">
  <ac:plain-text-link-body>
    <![CDATA[Anchor Link]]>
  </ac:plain-text-link-body>
</ac:link>
アンカー リンク
本文の組み込み画像とのリンク[!google.png!|ページタイトル#アンカー名]
<ac:link ac:anchor="Anchor Link">
    <ac:link-body>
	<ac:image><ri:url ri:value="http://confluence.atlassian.com/images/logo/confluence_48_trans.png" /></ac:image>
    </ac:link-body>
</ac:link>

画像などのリッチ コンテンツの場合、ac:link-body を使用してコンテンツを折り返す必要があります。

 
A Note on Link Bodies

エディタから取得されるすべてのリンクは、既定ではプレーンテキストで保存されます。ただし、リンク本体に含めることを許可されている一部のマークアップが検出された場合はこのかぎりではありません。リンク本体でサポートされているマークアップの例を以下に挙げます。

様々なリンク本体の例
<ac:link>
    <!-- Any resource identifier --> 
    <ri:page ri:content-title="Home" ri:space-key="SANDBOX" /> 
    <ac:link-body>Some <strong>Rich</strong> Text</ac:link-body>
</ac:link>

<ac:link>
    <ri:page ri:content-title="Plugin developer tutorial stuff" ri:space-key="TECHWRITING" />
    <ac:plain-text-link-body><![CDATA[A plain <text> link body]]></ac:plain-text-link-body>
</ac:link>

<ac:link>
    <ri:page ri:content-title="Plugin developer tutorial stuff" ri:space-key="TECHWRITING" />
    <!-- A link body isn't necessary. Auto-generated from the resource identifier for display. --> 
</ac:link>

 

画像

Format TypeIn Confluence 3.5 and belowIn Confluence 4.0 and above表示結果
Attached Image
!atlassian_logo.gif!
<ac:image>
  <ri:attachment ri:filename="atlassian_logo.gif" />
</ac:image>
External Image
!http://confluence.atlassian.com/images/logo/confluence_48_trans.png!
<ac:image>
  <ri:url ri:value="http://confluence.atlassian.com/images/logo/confluence_48_trans.png" /></ac:image>

Table of supported image attributes (some of these attributes mirror the equivalent HTML 4 IMG element): 

名前説明
ac:align画像の位置合わせ
ac:border境界を設定するには "true" に設定します
ac:classcss クラス属性
ac:title画像のツールチップ
ac:stylecss スタイル
ac:thumbnailこの画像をサムネイルとして指定するには "true" に設定します
ac:alt代替テキスト
ac:height画像の高さ
ac:width画像の幅
ac:vspace画像の上下の空白
ac:hspace画像の左右の空白

Format TypeIn Confluence 3.5 and belowIn Confluence 4.0 and above表示結果 
2 列、 2 行 (一番上の見出し行)
||Table Heading Cell 1||Table Heading Cell 2||
|Normal Cell 1|Normal Cell 2|
<table>
  <tbody>
    <tr>
      <th>Table Heading Cell 1</th>
      <th>Table Heading Cell 2</th>
    </tr>
    <tr>
      <td>Normal Cell 1</td>
      <td>Normal Cell 2</td>
    </tr>
  </tbody>
</table> 
表見出しセル 1表見出しセル 2
通常のセル 1通常のセル 2
2 列、3 行。2 行目と 3 行目の最初の列はマージされたセルになります。N/A
<table>
  <tbody>
    <tr>
      <th>Table Heading Cell 1</th>
      <th>Table Heading Cell 2</th>
    </tr>
    <tr>
      <td rowspan="2">Merged Cell</td>
      <td>Normal Cell 1</td>
    </tr>
    <tr>
      <td colspan="1">Normal Cell 2</td>
    </tr>
  </tbody>
</table> 
表見出しセル 1表見出しセル 2
マージされたセル通常のセル 1
通常のセル 2

その他

Format TypeIn Confluence 3.5 and belowIn Confluence 4.0 and above表示結果
絵文字:) 
<ac:emoticon ac:name="smile" />

(smile)

 :( 
<ac:emoticon ac:name="sad" />
(sad)
 :P 
<ac:emoticon ac:name="cheeky" />
(tongue)
 :D 
<ac:emoticon ac:name="laugh" />
(big grin)
 ;) 
<ac:emoticon ac:name="wink" />
(wink)
 (y) 
<ac:emoticon ac:name="thumbs-up" />
(thumbs up)
 (n) 
<ac:emoticon ac:name="thumbs-down" />
(thumbs down)
 (i) 
<ac:emoticon ac:name="information" />
(info)
 (/) 
<ac:emoticon ac:name="tick" />
(tick)
 (x) 
<ac:emoticon ac:name="cross" />
(error)
 (!)
<ac:emoticon ac:name="warning" />
(warning)

Resource Identifiers

リソース識別子は、保存形式でリソースへの "リンク" または "参照" を表すために使用されます。リソースの例としては、ページ、ブログ投稿、コメント、ショートカット、画像などがあります。 

リソースリソース識別子の形式
ページ
<ri:page ri:space-key="FOO" ri:content-title="Test Page"/>

メモ:

  • ri:space-key: (optional) denotes the space key. This can be omitted to create a relative reference
  • ri:content-title: (required) denotes the title of the page
ブログ投稿
<ri:blog-post ri:space-key="FOO" ri:content-title="First Post" ri:posting-day="2012/01/30" />

メモ:

  • ri:space-key: (optional) denotes the space key. This can be omitted to create a relative reference
  • ri:content-title: (required) denotes the title of the page
  • ri:posting-day: (必須) 投稿日を示します。形式は、YYYY/MM/DD です。
添付ファイル
<ri:attachment ri:filename>
	... 添付ファイル コンテナーのリソース識別子 ...
</ri:attachment>

メモ:

  • ri:filename: (required) denotes the name of the attachment
  • ri:attachment 要素のボディは、添付ファイルのコンテナを示すリソース識別子にします。これを省略して相対添付ファイル参照 (wiki マークアップの [foo.png] に類似) を作成することもできます。

例:

相対添付ファイル参照
<ri:attachment ri:filename="happy.gif" />
絶対添付ファイル参照
<ri:attachment ri:filename="happy.gif">
	<ri:page ri:space-key="TST" ri:content-title="Test Page"/>
</ri:attachment>
URL
<ri:url ri:value="http://example.org/sample.gif"/>

メモ:

  • ri:value: (必須) 実際の URL 値を示します。
ショートカット
<ri:shortcut ri:key="jira" ri:parameter="ABC-123">

メモ:

  • ri:key: (required) represents the key of the Confluence shortcut
  • ri:parameter: (required) represents the parameter to pass into the Confluence shortcut
  • 上記の例は、Wiki マークアップの [ABC-123@jira] に相当します。
ユーザー
<ri:user ri:username="fred"/>

メモ:

  • ri:username: (required) denotes the name of the user.
スペース
<ri:space ri:space-key="TST"/>

メモ:

  • ri:space-key: (必須) スペースのキーを示します。
コンテンツ エンティティ
<ri:content-entity ri:content-id="123"/>

メモ:

  • ri:content-id: (必須) コンテンツの ID を示します。

 

 

 

 

  • ラベルなし