Use a self-hosted JavaScript viewer in Confluence Server to export to HTML
When you export a diagram to HTML in draw.io for Confluence Server/Data Center, it uses JavaScript hosted on our online editor’s servers to display the draw.io diagram(s).
Instead of using this script over the internet, you can download the JavaScript file from the GitHub repository and host it yourself.
- Copy the
viewer-static.min.js
file from the draw.io GitHub repository at https://github.com/jgraph/drawio/tree/dev/src/main/webapp/js. - Store that file in a location where all of your Confluence users can access it, either online or within your company’s intranet, and copy its URL.
- As an administrator, click on the gear in the Confluence menu, then select General configuration to go to your instance’s administration area.
- In the left panel, under the draw.io add-on heading, select Configuration. Then select the Configuration tab.
- In the Server Configuration field, add the key/value pair:
viewerurl=https://jgraph.github.io/drawio/src/main/webapp/js/viewer-static.min.js
then click Save changes.