How do you create a macro to simply add pre-written text to a confluence page when in edit mode?

I need a way to be able to add some pre-written text to a confluence page when editing. 


My company often lists certain tasks with different bits of information and they want a way to be able to simply insert a template of text so that they only have to fill in the missing information, rather than copy and paste from previous tasks.


It seems like a really simple issue, but i'm struggling to find a solution. I'm assuming creating a macro is the right answer. Feel free to tell me I'm wrong!

Thanks in advance for any answers

2 answers

Do you need something different from the built in template functionality?  Confluence allows you to create templates which have pre-defined text in the page, and then you can have people edit this pre-defined text.  You can even set variables so people fill it in like a form.

Here is some more information:

If you want just one section to be pre-defined, then that is a different story.

1 vote

There's a couple of approaches, but there's a distinction we need to clarify.

When you add this macro, do you expect it to create a set of pre-set text and then remove itself?  Or should it remain as a macro on the page which always displays the pre-set text when the page is viewed?

If it's the first, there's not actually a lot you can do - macros are mostly supposed to run when a page is viewed.  There are some options when first creating a page, but the best place to look is the add-ons in the marketplace.

If it's the second, then it's easy, and you have options

  1. Use the include macro to include the content of a page you keep (read-only) elsewhere
  2. Write a macro add-on to display your text (I wouldn't bother with this, given 1 and 3, I mention it for completeness only)
  3. Write a "user macro" that displays the text you need

Suggest an answer

Log in or Sign up to answer
Community showcase
Posted Feb 06, 2019 in Confluence

Try out the new editing experience

Hi team, I’m Avinoam, a product manager on Confluence Cloud, and today I’m really excited to let the Community know that all customers can now try out the new editing experience and see some of the ...

1,013 views 51 8
Join discussion

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