Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Adding attachments using HTML macro

Jordan Moss
Contributor
July 19, 2022

Hi,

I'm currently trying to automate some of my company's reporting. This involves writing tables in HTML and then using the HTML macro block to insert the HTML table into the confluence page.

 

My HTML code is not a full program, it is just <table> <th>.... </table>

 

My issue is that we need to attach images/other attachments to this table.

According to the Atlassian storage format, the following code should produce the attachment:
```
<ac:link>
<ri:attachment ri:filename="image.png"></ri:attachment>
<ac:plain-text-link-body>
<![CDATA[Link to a Confluence Attachment]]>
</ac:plain-text-link-body>
</ac:link>
```

The format that I need is just text that is hyperlinked to the attachment

 

But when putting this code into Confluence, it doesn't produce anything. It's just blank. 

I have tried making a new page, attaching the file to the page, then pasting in the code.

Also tried to paste the code, then add the image afterwards.

Neither works, it just shows up as blank.

 

So my question is, is this possible to do? If so how?

Thanks

0 answers

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
TAGS
AUG Leaders

Atlassian Community Events