Links in Code/panel Macro

I want to link a particular word in my code block or panel to anothe page in my confluence space. However, when I insert a link in a code block or panel, it doesn't show.

What can I do please?

I am using confluence 3.5

2 answers

1 accepted

1 vote
Renjith Pillai Community Champion Apr 29, 2012

Code block itself is meant to avoid any formatting and render the content as it is. So if you need links inside code block, you may need to use {html} macro and format the content as per your wish.

Hi Renjith,

Thank you for your answer.

I tried the {html} macro but the code block recongizes HTML tags also as part of the code.

For example, say I used this:

<!--The port RMI registry is exposed-->
<RMIRegistryPort>{html}<A href="">9999</A>{html}</RMIRegistryPort>


I have attached a screenshot of what I get.

Any other way we can do this please?

I think Renjith meant "instead of using {code}", use html itself to format the code block

for example, something like this - you'd have to "escape" any characters that would cause the html to render, like the opening < in front of the comment to prevent it actually becoming a comment.

     &amp;gt;!--The port RMI registry is exposed--&gt;
     &lt;RMIRegistryPort&gt;&lt;A href=""&gt;9999&lt;/A&gt;&lt;/RMIRegistryPort&gt;

which would render as

     &lt;!--The port RMI registry is exposed--&gt;

Suggest an answer

Log in or Join to answer
Community showcase
Jason Wong
Published yesterday in Agility Beta

Welcome to agility

Every team in the world is unique, and so   Atlassian believes   that each and every team's best way of working  needs to  be molded to their unique circumstances  – ...

237 views 5 14
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
Atlassian Team Tour

Join us on the Team Tour

We're bringing product updates and pro tips on teamwork to ten cities around the world.

Save your spot