How to add labels to a page dynamically? Edited

Hi All -


Is there a way to dynamically add labels to a page in the text? Here are two examples for what I mean:


  1. Use a symbol that's not currently used natively by Confluence (eg. #, !) before the proposed tag to create the tag upon saving the page. For example:
    1. '!label1' would append the label 'label1' to the page upon saving (if using ! as the trigger)
    2. '#system-testing' would create the label 'system-testing' upon saving the page (if using # as the trigger)
  2. Use comma separated values entered into a textbox and converting them into page labels (see similar solution in this addon:


The usecase for this is to allow our users to easily enter tags in the pages they are creating as they are creating and editing the text. Ultimately, our authors will be creating a new page per project, and each project will have unique categories that will define each project (these categories we will define using labels). Therefore, we can't create a template page (or multiple template pages) that has all the labels predefined, as each page will have different and unpredictable content. We want to encourage our authors to label the pages as they are drafting the content, and the easiest way to do that would be to use a symbol before the label (see in example #1 above).


The key is to allow our users to create the label within the text since the text will be long and detailed, and it will be hard to go back through after drafting it and sifting through the text to find the appropriate labels. We would like to encourage them to create the labels as they are drafting.


Ideally, we would do this using a simple macro as opposed to paying for a pricier add on (ie. in example #2 above), since we don't need every feature this add-on has to offer.


Does anyone know of a native solution, or can help build a macro that would accomplish this? I'm new to macros and plugins so appreciate any help that's offered.


On a side note, as I post this question, the 'Tags' feature below would also be a potentialy helpful solution if it were something we could add-on easily to allow our users to select multiple visible and pre-defined labels while creating pages. Is this feature available natively in Confluence (I know it's not, but I could be wrong)?

Screen Shot 2017-07-24 at 10.26.43 AM.png




PS. Stephen Deutsch (for some reason, I can't tag you), I would love to take you up on your offer to whip up a user macro for this... if it's still on the table 2.5 years later.

1 answer

Funny, I just happened to see your question. Maybe I'll see what I can do, but it may not be right away.

Much appreciated Stephen! Let me know if I can help. Thanks for responding.

Hey Stephen - any chance you are able to take a look at creating this javascript user macro?

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...

473 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