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

This widget could not be displayed.

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.

This widget could not be displayed.

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
This widget could not be displayed.

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

This widget could not be displayed.

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

This widget could not be displayed.

Nice post thanks it help me to learn more about macros

This widget could not be displayed.

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

This widget could not be displayed.

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
Atlassian Summit 2018

Meet the community IRL

Atlassian Summit is an excellent opportunity for in-person support, training, and networking.

Learn more
Community showcase
Posted yesterday in Canada

AUG Lunch Roundtable - August 13 - Highlights

Thanks to everyone who came out today for the lunch AUG - we had some great food and discussion (and ice cream sandwiches to fend off the heat!) The welcome and fun fact was great as well, what an aw...

37 views 2 3
View post

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