How can I comment out parts of wiki Markup?

I want to keep some sophisticated macro settings or text blocks in an article, but just for a while (presentation) I want to make them disappear.

Right after that I want to activate this part of the article again.

How do I do that?

7 answers

1 accepted

You could just do a page edit, then use the page history to revert back to the previous version.

https://confluence.atlassian.com/display/DOC/Page+History+and+Page+Comparison+Views

Thanks, that's true. Just too simple for my master mind ;-)

But is there indeed a way of hiding parts of the markup text? This could be useful to comment on macro settings. They're sometimes hard to find. Users with no programming ambition may like this, when they lookup wiki markup. So people don't need to study all options of a macro in confluence documentation.

I was just looking for this answer, but no luck outside of the "revert" method. However, I decided to poke around through all of the documentation, and found a solution for the next person that finds this thread. Hope it helps.

This will hide your wiki markup without having to delete it, then you can just remove the comment tags when you're ready for it to be used again.

{HTMLcomment:hidden}
HTML comment text
{HTMLcomment}

I have a feeling there is another way, but can't remember it at the moment, but I can give you this...

if you write a user macro, it can take the body, macro with settings and ignore it. It will still be in the page but just wont be rendered. Or you could dump it into some HTML comments if you wanted.

## Macro title: comment-out
## Macro has a body: Y
## Body processing: Escape HTML
## Output: Selected output option
##
## Developed by: Matthew Cobby
## Date created: 01/02/2013
## Installed by: Matthew Cobby

## do nothing..... just hide the body in HTML comments
<!-- $body -->

Creating a user macro as Matthew suggested is the simpliest way for what you described. Hide macro has more sophisticated options.

Nice post thanks it help me to learn more about macros

me any my agency www.millionairelovers.com would like to thank you your organization for all the help and information. ...

Use the Cloak macro and put your content inside. The cloak should be set as initially hidden. If there is no toggle cloak macro that references it, the cloak will only appear on the edit screen.

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
Published 8 hours ago in Jira Software

How large do you think Jira Software can grow?

Hi Atlassian Community! My name is Shana, and I’m on the Jira Software team. One of the many reasons this Community exists is to connect you to others on similar product journeys or with comparabl...

104 views 4 5
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