Confluence 5.1 のサポートは終了しています。
ドキュメントの最新バージョンを確認してください。
Let's write a simple macro that creates a red box (using an existing Confluence style) around some text. This may be useful for writing about error conditions, for example. For full details about creating a user macro, see the guide to writing user macros.
Defining the 'Error' user macro
To create the 'Error' user macro:
- Choose the cog icon at top right of the screen, then choose Confluence Admin.
- Choose User Macros in the left-hand panel.
- Choose Create a User Macro at the bottom of the list of macros.
- Enter the macro attributes as follows:
- Macro Name:
error - Visibility:
Visible to all users in the Macro Browser - Macro Title:
Error - Description:
Displays a red box around some text - Categories:
Confluence Content - Icon URL: You can leave this field empty.
- Documentation URL: You can leave this field empty.
- Macro Body Processing:
Rendered Template:
## @noparams <div class="error">$body</div>
- Macro Name:
- 保存を選択します 。
The information on this page does not apply to Confluence OnDemand.
Using the 'Error' macro on a page
To add the macro to a page, edit the page and choose Insert > Other Macros and find the 'Error' macro. (Or use autocomplete: start typing '{err' in the editor, and select the 'Error' macro from the list of suggestions that appears.)
Your page will display an error box, like this:
(Write your error message here.)
概要
コンテンツ ツール
アプリ

