Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

How can I comment out parts of wiki Markup?

Anselmo January 31, 2013

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
Answer accepted
MatthewC
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
January 31, 2013

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

Anselmo January 31, 2013

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.

1 vote
Netkos Ent April 7, 2015

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}
0 votes
Dan Mish June 12, 2015

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.

0 votes
Jeff louis March 10, 2015

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

0 votes
Scott Gann (CarLoanStudent) January 19, 2015

Nice post thanks it help me to learn more about macros

0 votes
Bob Swift OSS (Bob Swift Atlassian Apps)
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
January 31, 2013

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

0 votes
MatthewC
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
January 31, 2013

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

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events