How to display content only in 'edit' mode (and so, not visible in 'read' mode)?

(For Confluence version 5.8.18)

I am looking for a way (macro?) to propose this:

in a wiki page, inserting some content that is displayed only in 'edit' mode (indeed, it would be some guidelines about how to manage content in edit mode). But when in 'reading' mode, this content would not be displayed.

Is there a macro that does this kind of job?

Thank you!

4 answers

1 accepted

Yes you can do this. 

Use the Confluence Source Editor addon, edit the page, click the "<>" button and put the following code.

<ac:placeholder>This text will only be visible in edit mode
</ac:placeholder>

 

If the answer solves your question please mark it as accepted so that it might benefit other people.

Great, it works well! Thank you.

This feature is supported by the Section Macro (Hide Parameter).

I assume that this can also be achieved by a user macro and there are probably many macros that allow to hide content (e.g. see here). I'd recommend to check if there is already a macro with a 'hide' feature installed on your Confluence. ;)

The one I provided a link for is part of a free add-on on the Atlassian Marketplace. Please note that I'm one of the authors of this add-on. 

Thanks Robert for your feedback.

I cannot find the 'Hide' parameter with the 'Section' macro:

confluence-section-macro.png

Thank you for you feedback!

You would need the Section Macro from the Project Documentation Add-on (the name is the same as the one of the Section Macro provided by Confluence).

1 vote

There's another trick to this if you want to do it without add-ons.

Create a new template, and look carefully for the formatting for guidance or placeholder text.  Create some text and make it that type.

Create a new page from the template, so you end up in edit mode.

Highlight and copy some of the placeholder text.

Paste it into the edit page for the page you want it on and then update the text to what you need there.

Great! worked for me (though i had to copy whole paragraph which included "instruction text" not just one line)

Gliffy seems to be able to render previews in edit mode without image markup in their macro body. Any idea how they accomplish this? Their macro rich-text bodies are empty if you examine the page storage format...

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
Posted Tuesday in Confluence

We want to see the templates you've created in Confluence!

Hi Community, Jessica here from the Confluence Product Marketing team!  July’s community challenge is all about sharing pictures  — and as an extension of our first post on what ...

387 views 17 9
Join discussion

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