Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Next challenges

Recent achievements

  • Global
  • Personal


  • Give kudos
  • Received
  • Given


  • Global

Trophy case

Kudos (beta program)

Kudos logo

You've been invited into the Kudos (beta program) private group. Chat with others in the program, or give feedback to Atlassian.

View group

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage diagrams and HTML Export Edited

I've just HTML exported a space that contains a lot of diagrams but they are not being displayed when I view the HTML. They are there as attachments on each page but they are not displayed inline when viewing the files in Chrome (or Safari). I notice there are errors in the console for every diagram:

Uncaught ReferenceError: require is not defined for every script block, such as (redacted):

<script class="ap-iframe-body-script">
var data = {
"moduleType":"dynamicContentMacros", "moduleLocation":"content", "cp":"/wiki",
"structuredContext": "{\"license\":{\"active\":true},\"confluence\":{\"macro\":{\"outputType\":\"html_export\",\"hash\":\"XXXX\",\"id\":\"XXXX\"},\"content\":{\"type\":\"page\",\"version\":\"XXXX\",\"id\":\"XXXX\"},\"space\":{\"key\":\"XXXX\",\"id\":\"XXXX\"}}}",
"productCtx":"{\"\":\"XXXX\",\"macro.hash\":\"XXXX\",\"page.type\":\"page\",\"contentId\":\"XXXX\",\"simple\":\"0\",\"inComment\":\"0\",\": = | RAW | = :\":\"contentId=XXXX|simple=0|zoom=1|inComment=0|pageId=XXXX|diagramDisplayName=XXXX.drawio|lbox=1|contentVer=1|revision=1|baseUrl=XXXX\",\"\":\"XXXX\",\"diagramDisplayName\":\"XXXX\",\"diagramName\":\"XXXX.drawio\",\"links\":\"\",\"tbstyle\":\"\",\"height\":\"341\",\"space.key\":\"XXXX\",\"\":\"XXXX\",\"content.version\":\"XXXX\",\"page.title\":\"XXXX\",\"zoom\":\"1\",\"macro.body\":\"\",\"pageId\":\"XXXX\",\"macro.truncated\":\"false\",\"lbox\":\"1\",\"content.type\":\"page\",\"output.type\":\"html_export\",\"contentVer\":\"1\",\"page.version\":\"XXXX\",\"revision\":\"XXXX\",\"user.key\":\"XXXX\",\"baseUrl\":\"XXXX\",\"\":\"XXXX\",\"width\":\"XXXX\",\"\":\"XXXX\"}",
"apiMigrations": {
"gdpr": true
if(window.AP && window.AP.subCreate) {
} else {
require(['ac/create'], function(create){

The error is on this line: require(['ac/create'], function(create){

Are diagrams supported in HTML exports? If so, any idea how I can get them working?

1 answer

Thanks for your answer. Unfortunately an HTML export from Confluence does not preserve macros in a way that would allow us easily to inject our diagrams in the exported HTML page. This is why you cannot export HTML content and have an included diagram automatically.

Suggestion for a workaround: You will find a PNG of your diagram as an attachment of the page. You could inject this image in the HTML export. Or you could (temporarily) replace the real diagram with the picture and start the export then. After the export you can revert to the version with the real diagram. I admit that this is not a cool workaround.

If you want, you can describe the context of your question. Why do you want to export to HTML at all. Maybe there are other alternatives.

Would be nice, if this PNG replacement could happen automatically. We have really many diagrams and manual replacement is not an option.

Suggest an answer

Log in or Sign up to answer
Community showcase
Posted in Confluence

What do you think is the most *delightful* Confluence feature? Comment for a prize!

- Create your own custom emoji 🔥 - "Shake for Feedback" on mobile 📱 - An endless supply of GIFs via GIPHY 🤩 Is there anything quite as nice as a pleasant surprise? Comment below with what...

415 views 23 8
Join discussion

Community Events

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

Find an event

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

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you