How to add macro in confluence page using script ?

Udit
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!
April 27, 2018

I have a confluence page created already. I want to add macro (for example expand & csv plugin) at a particular place in that page using script. Which scripting will be easy to do this ? Can you please indicate reference documents or example for it ? I am new to this. Thank you in advance.

1 answer

1 vote
Christian Reichert (resolution)
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
April 27, 2018

Hi @Udit,

you say you created a page already - good. So let's start on the content you can put into the Page using the Atlassian Storage format.

Here is an explanation of the Storage format and some examples (no macro yet)

https://confluence.atlassian.com/doc/confluence-storage-format-790796544.html

Here is an example for the chart macro

https://confluence.atlassian.com/conf59/confluence-storage-format-examples-for-chart-macro-792499077.html

One of easiest ways later is however to build the page in confluence like you want it and save it - then click on ... -> Show Storage Format. That will show you how this particular page including all it's macro's is stored. 

Udit
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!
April 27, 2018

Thank you for help.

Is there any package or anything available that we can include in our script (like java, shell..) and use its API commands directly to create macro (without going into storage format) in confluence page ?

I thought about it from this page https://marketplace.atlassian.com/plugins/org.swift.confluence.script/server/overview

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events