How can I make a link that will have in href exact text I provide, e.g. <a href="my_text">123</a>


2 answers

0 votes
Thomas Schlegel Community Champion Aug 04, 2016

Hi Dawid,

creating a link on a Confluence page results in a form with two fields:

  • Address  (that is "my_text" in our example)
  • Link text (that is "123" in your example




Hi Thomas,

Thank you for your answer. Unfortunately it does not work sad
Result is:
<a href="http://my_text" class="external-link" rel="nofollow">123</a> 
"http://" is added and it prevent my link from working.



Thomas Schlegel Community Champion Aug 04, 2016

What kind of link do you want to add to your page?

It is a link with defined protocol which runs application on local machine. It allows user to start program with given parameters by a link.
It look somthing like this:

Thomas Schlegel Community Champion Aug 04, 2016

OK, I see. This is quite tricky. 

I've tested with regular confluence links - they always produced some kind of app-version://<our-confluence-url>/?param...

I think, the best way is, to write a user defined macro that produces this link. Try something like this:


## This is an example macro
## @param param1:title=param1|type=string|required=true|desc=param1description
## @param param2:title=param2|type=string|required=true|desc=param2description
<a href="app-version:///?param=$param1&param2=$param2">123</a>


The macro produces the following output on the page:

<a href="app-version:///?param=$param1&amp;param2=$param2" rel="nofollow">123</a></p>

Doesn't it require administrator privileges?
Anyway I managed to solve my problem by using HTML macro.

Thank you for you help!

Thomas Schlegel Community Champion Aug 04, 2016

You're welcome smile

Yes, creating user defined macros requires admin privileges.

Using HTML macro is doing nearly the same, but for security reasons, we do not allow our users to add plain HTML to their pages.

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

893 views 45 7
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