Include HTML file in a Confluence page

Is it possible to include an HTML file in a Confluence page using the html-include macro?

I've configured the macro as follows:

file://Users/<path-to-file>

and tried to configure the whitelist entry for that location as follows:

file://Users/<path-to-file>

but I'm still getting the message:

Could not access the content at the URL because it is not from an allowed source.

file:///Users/<path-to-file>

Configure whitelist >>

Any ideas what I'm doing wrong?

5 answers

1 accepted

It seems there are issues linking to local files in Confluence. See https://confluence.atlassian.com/x/MYXuD.

I resolved the issue by setting up a local web server that can host the content using another protocol which won't trigger this error as suggested in the above link.

I don't think you can use the file protocol with this. That makes sense -- for a different user on a different computer, it would point to a different file.

(From the error message you get, it also might be that the whitelist needs to be configured for your Confluence instance -- you need to be a Confluence admin to do that. However, my whitelist is configured to allow anything, and the file protocol still doesn't work for me.)

Hi,

You can use Confluence a your file directory. You just need to drop the file in the <install-folder>/confluence that way you should be able to get this file from Confluence.

Cheers,
WZ

I've tried all sorts of permutations and I just can't get this to work. Please can you elaborate.

In order to simplify this I've added a file to the Confluence install folder and tried using the HTML macro.

{html}<a href="file:///<path-to>/file-name.html> </a>{html}
 
I can open the file I'm pointing to in Chrome.
 
 

You can use the HTML Macro from HTML for Confluence - it allows you to have the HTML source come from the file system.

It shouldn't be necessary to install this in order to achive what I want to though should it? We don't allow exernal access to Confluence and the html files I want to diplay are on the company network.

Hello All,

My use case is to allow HTML tags to be executed and rendered (like tables) but not to execute any JS/CSS. Is there a to implement it.

Suggest an answer

Log in or Sign up to answer
Atlassian Community Anniversary

Happy Anniversary, Atlassian Community!

This community is celebrating its one-year anniversary and Atlassian co-founder Mike Cannon-Brookes has all the feels.

Read more
Community showcase
Kesha Thillainayagam
Posted Apr 13, 2018 in Confluence

We want to hear how your non-technical teams are using Confluence!

Hi Community! Kesha (kay-sha) from the Confluence marketing team here! Can you share stories with us on how your non-technical (think Marketing, Sales, HR, legal, etc.) teams are using Confluen...

2,769 views 26 10
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you