Confluence ストレージフォーマット

このページの内容

お困りですか?

アトラシアン コミュニティをご利用ください。

コミュニティに質問

このページでは、Confluence がページのコンテンツ、ページテンプレート、ブループリント、ブログ投稿、およびコメントを保存するために使用するXHTML ベース形式について説明します。この情報は、Confluence ページの基本マークアップの解釈と編集を行う必要がある上級ユーザーを対象としています。 

Confluence の保存形式は、「XHTML ベース」といいます。正確を期すためには XML と呼ぶべきでしょう。というのも、Confluence の保存形式はXHTML 定義に準拠していないからです。特に、Confluence ではマクロなどにカスタム要素が含まれています。アトラシアンでは、保存形式で HTML が大部分を占めていることを示すために「XHTML ベース」という用語を使用しています。

その他のオプション
 > [保存形式の表示] を選択します。このオプションは、次のいずれかに該当する場合にのみ使用可能です。

On this page:

見出し

形式のタイプ

Confluence 4.0 以降表示結果
Heading 1
<h1>Heading 1</h1> 

Heading 2
<h2>Heading 2</h2> 

Heading 3
<h3>Heading 3</h3> 

見出し 4 から 6 まで利用でき、同じパターンに従います

テキスト効果

形式のタイプ

Confluence 4.0 以降表示結果
より強い強調/太字
<strong>strong text</strong>
太字
強調
<em>Italics Text</em>
強調
取り消し線
<span style="text-decoration: 
line-through;">
strikethrough</span>
取り消し線
下線
<u>underline</u>
下線
上付き
<sup>superscript</sup>
上付き
下付き
<sub>subscript</sub>
下付き
等幅
<code>monospaced</code>
monospaced
書式設定済み
<pre>preformatted text</pre>



書式設定済みテキスト
ブロック引用
<blockquote>
<p>block quote</p>
</blockquote>
ブロック引用
テキスト色
<span style="color: rgb(255,0,0);">red text
</span>
赤い文字
文字サイズ小
<small>small text</small>



小さい文字

文字サイズ大
<big>big text</big>

大きい文字

中央揃え
<p style="text-align: center;">centered text
</p>
中央揃えテキスト
右揃え
<p style="text-align: right;">right aligned text
</p>

右揃えテキスト

テキストの改行

形式のタイプ

Confluence 4.0 以降表示結果
新しい段落
<p>Paragraph 1</p>

<p>Paragraph 2</p>

段落 1

段落 2

改行
Line 1 <br /> Line 2

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

行 1
行 2 
水平線
<hr />

— 記号

&mdash;

– 記号
&ndash;

リスト

形式のタイプ

Confluence 4.0 以降表示結果
番号なし箇条書き – 黒丸 (Round Bullet)
<ul>

<li>round bullet list item</li>
</ul>
  • 番号なし箇条書き項目
番号付き箇条書き (番号付きリスト)
<ol>

<li>numbered list item</li>
</ol> 
  1. 番号付き箇条書き項目
タスク一覧
<ac:task-list>
    <ac:task>
        <ac:task-status>incomplete</ac:task-status>
        <ac:task-body>task list item</ac:task-body>
    </ac:task>
</ac:task-list>
  • タスク一覧項目

形式のタイプ

Confluence 4.0 以降表示結果
別の 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 ページにリンク
添付ファイルへのリンク
<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>
添付ファイルへのリンク
外部サイトにリンク
<a href="http://www.atlassian.com">Atlassian</a>
アトラシアン
アンカー リンク (同じページ)
<ac:link ac:anchor="anchor">
  <ac:plain-text-link-body>
    <![CDATA[Anchor Link]]>
  </ac:plain-text-link-body>
</ac:link>
アンカー リンク
アンカー リンク (別のページ)
<ac:link ac:anchor="anchor">
  <ri:page ri:content-title="pagetitle"/>
  <ac:plain-text-link-body>
    <![CDATA[Anchor Link]]>
  </ac:plain-text-link-body>
</ac:link>
アンカー リンク
本文の組み込み画像とのリンク
<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 を使用してコンテンツを折り返す必要があります。


リンク本体に関する注意

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

様々なリンク本体の例
<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>


<ac:link-body> 内で許可されているマークアップ タグは、<b>、<strong>、<em>、<i>、<code>、<tt>、<sub>、<sup>、<br>、<span> です。

画像

形式のタイプ

Confluence 4.0 以降表示結果
添付された画像
<ac:image>
<ri:attachment ri:filename=
"atlassian_logo.gif" />
</ac:image>
外部の画像
<ac:image>
<ri:url ri:value="http://confluence.atlassian.com/
images/logo/confluence_48_trans.png" /></ac:image>

サポートされている画像属性 (これらの属性の一部は、同等の HTML 4 IMG 要素に酷似しています):  

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

形式のタイプ

Confluence 4.0 以降表示結果 
2 列、 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 行目の最初の列はマージされたセルになります。
<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

ページレイアウト

Confluence は、マクロベースのレイアウト (セクションや列のマクロの使用など) の代替として、ページ レイアウトを直接サポートしています。このセクションでは、これらのレイアウトがページで使用されるときに作成される保存形式 XML について説明します。

要素名Confluence 5.2 以降属性
ac:layout

ページにレイアウトがあることを示します。ページ内の最上位の要素にします。

なし
ac:layout-section

レイアウト内のを表します。ac:layout タグに直接含める必要があります。セクションのタイプは、セル数とそれらのセルの相対幅を示します。


ac:type
ac:layout-cellレイアウト内のを表します。ac:layout-section タグに直接含める必要があります。layout-section 内のセル数は、ac:type に一致する適切な値である必要があります。なし

ac:layout-sectionac:type で認識される値は、次のとおりです。

ac:type

期待されるセル数

説明

single

11つのセルがセクション全体を占有します。
two_equal 2同じ幅の2つのセルです。
two_left_sidebar 2幅が狭い (~30%) セルの後に幅の広いセルが続きます。
two_right_sidebar 2幅の広いセルに幅の狭い (~30%) セルが続きます。
three_equal 3同じ幅の3つのセルです。
three_with_sidebars 3幅の広い 1 つのセルが中央にあり、両端に幅の狭い (~20%) セルがあります。

次の例は、新しい形式に組み込まれた旧形式の少し複雑なレイアウトの 1 つです。{content} は、<p> または <table> タグなどの他の XHTML または Confluence 保存形式のブロック コンテンツを入力する場所を示しています。

<ac:layout>
  <ac:layout-section ac:type="single">
     <ac:layout-cell>
        {content}
     </ac:layout-cell>
  </ac:layout-section>
 <ac:layout-section ac:type="three_with_sidebars">
     <ac:layout-cell>
       {content}
     </ac:layout-cell>
     <ac:layout-cell>
       {content}
     </ac:layout-cell>
     <ac:layout-cell>
       {content}
     </ac:layout-cell>
  </ac:layout-section>
  <ac:layout-section ac:type="single">
     <ac:layout-cell>
        {content}
     </ac:layout-cell>
  </ac:layout-section>
</ac:layout>

絵文字

形式のタイプ

Confluence 4.0 以降表示結果
絵文字
<ac:emoticon ac:name="smile" />

(smile)


<ac:emoticon ac:name="sad" />
(sad)

<ac:emoticon ac:name="cheeky" />
(tongue)

<ac:emoticon ac:name="laugh" />
(big grin)

<ac:emoticon ac:name="wink" />
(wink)

<ac:emoticon ac:name="thumbs-up" />
(thumbs up)

<ac:emoticon ac:name="thumbs-down" />
(thumbs down)

<ac:emoticon ac:name="information" />
(info)

<ac:emoticon ac:name="tick" />
(tick)

<ac:emoticon ac:name="cross" />
(error)

<ac:emoticon ac:name="warning" />
(warning)

リソース識別子

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

リソース

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

メモ:

  • ri:space-key: (オプション) スペース キーを示します。これを省略して相対参照を作成することもできます。
  • ri:content-title: (必須) ページのタイトルを示します。
ブログ投稿
<ri:blog-post ri:space-key="FOO" ri:content-title="First Post" ri:posting-day="2012/01/30" />

メモ:

  • ri:space-key: (オプション) スペース キーを示します。これを省略して相対参照を作成することもできます。
  • ri:content-title: (必須) ページのタイトルを示します。
  • ri:posting-day: (必須) 投稿日を示します。形式は、YYYY/MM/DD です。
添付ファイル
<ri:attachment ri:filename>
	... resource identifier for the container of the attachment ...
</ri:attachment>

メモ:

  • ri:filename: (必須) 添付ファイル名を示します。
  • 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: (必須) Confluence ショートカットのキーを表します。
  • ri:parameter: (必須) Confluence ショートカットに渡すパラメータを表します。
  • 上記の例は、Wiki マークアップの [ABC-123@jira] に相当します。
ユーザー
<ri:user ri:userkey="2c9680f7405147ee0140514c26120003"/>

メモ:

  • ri:userkey: (必須) ユーザーの一意の識別子を示します。
スペース
<ri:space ri:space-key="TST"/>

メモ:

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

メモ:

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

テンプレート変数

次のスクリーンショットは単純なテンプレートを示しています。

テンプレートには次の変数が含まれています。

変数名タイプ
$MyText単一行テキスト
$MyMulti複数行テキストサイズ: 5 x 100
$MyList一覧リストの項目: Apples,Pears,Peaches

XML エクスポートにより、このテンプレート用に次のコードが生成されます。

<at:declarations>
  <at:string at:name="MyText" />
  <at:textarea at:columns="100" at:name="MyMulti" at:rows="5" />
  <at:list at:name="MyList">
    <at:option at:value="Apples" />
    <at:option at:value="Pears" />
    <at:option at:value="Peaches" />
  </at:list>
</at:declarations>


<p>This is Sarah's template</p>

<p>A single-line text variable:&nbsp;<at:var at:name="MyText" /></p>

<p>A multi-line text variable:&nbsp;<at:var at:name="MyMulti" /></p>

<p>A selection list:&nbsp;<at:var at:name="MyList" /></p>

<p>End of page.</p>

説明テキスト

説明テキストを使用すると、エンドユーザー (テンプレートからページの作成を使用する人) 向けにテンプレートの記入方法に関する情報を含めることができます。説明テキストの動作は次のとおりです。

  • 特定のテキスト ブロックにユーザーが入力すると、すべての 説明テキストが自動でクリアされます。
  • ユーザーが選択できるように @mention プロンプトが自動でトリガーされます (「mention」タイプの説明テキストの場合)。

スクリーンショット: 説明テキストの例

<ul>
    
<li><ac:placeholder>This is an example of instruction text that will get replaced when a user selects the text and begins typing.</ac:placeholder></li>
</ul>
<ac:task-list>
    <ac:task>
        <ac:task-status>incomplete</ac:task-status>
        <ac:task-body><ac:placeholder ac:type="mention">@mention example. This placeholder will automatically search for a user to mention in the page when the user begins typing.</ac:placeholder></ac:task-body>
    </ac:task>
</ac:task-list>
最終更新日: 2023 年 2 月 14 日

この内容はお役に立ちましたか?

はい
いいえ
この記事についてのフィードバックを送信する
Powered by Confluence and Scroll Viewport.