How to insert macro "" by wiki markup language

Leon Li July 3, 2023


I don't find the related macro wiki markup language grammar.


3 answers

0 votes
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
January 26, 2024

Hey Leon,


After some experimentation, I found that you're able to include a pre-existing diagram into wiki markup by referencing the original page id of the diagram and the name of the diagram using the {inc-drawio} macro.


For instance, if I create a new diagram named "my_diagram.drawio" on a page with ID 123456789, I can then include this diagram on a different page in wiki markup by using:



The awkward part here is getting the pageId of the owning page. If you're interacting with a lot of diagrams or using wiki markup frequently to include drawio diagrams, it may make sense to create a single/few page(s) where you create all the diagrams to have a known pageId you can reference easily.


If you're doing this through code like the atlassian-python-api package, it would be much easier to grab the reference page containing the diagrams, e.g.:

from atlassian import Confluence

confluence = Confluence( url='http://localhost:8090', username='admin', password='admin')

= confluence.get_page_by_title(space="MySpaceName", title="Diagrams Reference")

new_page = confluence.create_page(
title="New Page Including Diagram",
body=f"""h1. Include Drawio test



Hope this helps!

0 votes
David Benson July 3, 2023

You could try {drawio}, but I doubt the markdown parser will understand that. If it's possible to insert raw confluence page storage format into markdown, that should work.

0 votes
Bastian -drawio Diagrams-
Marketplace Partner
Marketplace Partners provide apps and integrations available on the Atlassian Marketplace that extend the power of Atlassian products.
July 3, 2023

Hi Leon. Attached you find a screenshot of all the supported formats you can use to generate a diagram from code (Arrange > Insert > Advanced):


Screen Shot 2023-07-03 at 11.12.13.png


Suggest an answer

Log in or Sign up to answer
AUG Leaders

Atlassian Community Events