How to faster select macro parameters?

Is it possible to define user-define default parameter for macros?

How can use faster select a macro parameter without clicking the UI?

Use case:

A user frequently uses the "Cod block" macro. He always sets the "Syntax Highlighting" parameter to "Bash". But this always needs several clicks. The user wishes to get his macro prepared more easily and faster.

5 answers

1 accepted

3 votes
Accepted answer

Based on the discussion before, the following solution can be suggested; thanks to all contibutors:

You can set macro parameters while typing in the wiki editor. Just type

{macro name:parameter name=parameter value}

for example



I don't know how to do this programatically, but you could create a page that contains all the macros you want to use, and set up their parameters as required.

Then all you have to do is copy and paste them into the pages where you need them.

You might have to change one or two parameters to suit the page, but you could cut out quite a lot of the work.


Dare I say: use wiki and Insert markup. :)

More seriously, for this particular case they can just type: {code:bash} and it will auto-create

Unfortunately not working on Confluence 5.1.5 :-(

Thanks Bob, that guides me to the correct solution:

You have to type


in order to autocreate the macro.

Thanks, Mick. That's an option indeed. However, not the most covenient (that means fast) solution.

I thought more about some settings, autocomplete, keyboard shortcuts or the like.

No worries. :) As far as I know there isn't any way you can do these things from the keyboard. it might be possible to edit a macro so that it has several defaults automatically, but I wouldn't know how to do that.

It'd be good to find out though.


Another possible approach is to write a User Macro that embeds the macro you want to use. You can pass params to it and possibly set defaults... I haven't looked into it yet, but I might give this a try.

And the nuclear option, of course, is to write your own user macro and set your params, but emulating existing ones can be especially hard with some of them.

Suggest an answer

Log in or Sign up to answer
Community showcase
Published Dec 18, 2018 in Confluence Cloud

Happy holidays from our team to yours!

Hi Community!  2018 was filled with changes for our team, both big and small, and we've taken a lot of time to both celebrate our wins and recognize areas of improvement. One thing that we're a...

484 views 3 18
Read article

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