HTML table in user macro not respecting inline style
プラットフォームについて: Data Center のみ。 - This article only applies to Atlassian apps on the Data Center プラットフォーム。
この KB は Data Center バージョンの製品用に作成されています。Data Center 固有ではない機能の Data Center KB は、製品のサーバー バージョンでも動作する可能性はありますが、テストは行われていません。 Server* 製品のサポートは 2024 年 2 月 15 日に終了しました。Server 製品を実行している場合は、 アトラシアン Server サポート終了 のお知らせにアクセスして、移行オプションを確認してください。
*Fisheye および Crucible は除く
問題
Inline styling for HTML tables is not being respected. It is actually being stripped out and replaced with the following:
<table width="100%">
<tr valign="middle">
<td width="34">
<ac:image><ri:attachment ri:filename="$paramicon" /></ac:image>
</td>
<td>
<div class="tabletitle">$paramheading</div>
</td>
</tr>
</table>It is then processed into:
<table class="confluenceTable">
<tbody>
<tr>
<td class="confluenceTd">
<img class="confluence-embedded-image" src="<path_to_attachment>" data-image-src="<path_to_attachment>">
</td>
<td class="confluenceTd">
<div class="tabletitle">Boosh</div>
</td>
</tr>
</tbody>
</table>回避策
We can get the styling we want by injecting style directly into the user macro. This will give us the handles we need to affect styling that will not be stripped out when the macro is rendered.
<style type="text/css">
table.wide_table{width: 100%;}
table.wide_table .image_cell{width: 34px;}
</style>
<table class="wide_table">
<tbody>
<tr>
<td class="image_cell">
<img class="confluence-embedded-image" src="<path_to_attachment>" data-image-src="<path_to_attachment>">
</td>
<td>
<div class="tabletitle">Boosh</div>
</td>
</tr>
</tbody>
</table>更新日時: September 25, 2025
この内容はお役に立ちましたか?
さらにヘルプが必要ですか?
アトラシアン コミュニティをご利用ください。