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

2 votes
Answer 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
Community showcase
Published Mar 12, 2019 in Confluence

Confluence Admin Certification now $150 for Community Members

More and more people are building their careers with Atlassian, and we want you to be at the front of this wave! Important Dates Start the Certification Prep Course by 2 April 2019 Take your e...

1,510 views 4 13
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