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

1 vote
Accepted answer

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

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.

HTML comment text

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 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
Community showcase

Scrum Roles Explained: the Do's and the Don'ts

Hello Community,  Today we are going to talk about the three Scrum Roles. There is the Development Team, the Scrum Master and the Product Owner. In my opinion these three are all really impo...

131 views 2 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