How do I format Confluence template variable?

Hello, I have a template, I would like the text inserted as a variable be formatted, even as simply as bolded. I have tried to put $var between ** but as much as it does bold the text it leaves the * tags as well.. I will really appreciate help.

4 answers

1 accepted

Hi Piotr,

It is possible to add the formatting, but certainly not obvious! I successfully made some template-variable text bold by the following method:

  1. Add the template variable in the template Editor screen
  2. Select the variable placeholder by dragging the cursor over the variable (the same way that you would select any text)
  3. Press the bold button in the toolbar.
  4. No feedback! You can't tell that the variable is "bold" by looking at it, but if you're familiar with inspecting DOM elements in a browser you can see that the Editor source has been updated to put "strong" (bold) tags around the variable placeholder in the HTML.
  5. Save the template and start creating a new page from it via the Create dialog (as usual)
  6. Enter the variable's value in the Page Template Wizard and press the Next button
  7. In the Editor you can see that the text you added is bold, and if you save the page the formatting is applied.

The variable placeholder in the Editor needs to be improved so that when formatting is applied, the formatting button/value in the toolbar accurately represents the state of the placeholder.

I will try it out, thanks!

What version of confluence?

What version of confluence?

It is OnDemand, so Confluence 5.3-OD-4.

Suggest an answer

Log in or Sign up to answer
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Posted Jul 10, 2018 in Confluence

We want to see the templates you've created in Confluence!

Hi Community, Jessica here from the Confluence Product Marketing team!  July’s community challenge is all about sharing pictures  — and as an extension of our first post on what ...

781 views 23 12
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