How to disable Confluence inline comments in just one space, but allow old-style end comments? Edited

I've seen this page that discusses how to disable the comments section at the end of the page: https://confluence.atlassian.com/confkb/how-to-disable-commenting-on-an-individual-page-695107603.html

However, what I am interested in doing is keeping THAT comment facility but disabling the new one that comes with the inline commenting add-on.

The trick is that the inline commenting add-on can't be globally disabled, because our content development and release areas run on the same instance of confluence.

Is there a trick like the javascript function in the linked page above, that works for the inline comments? Some sort of event override perhaps?

A co-worker has found https://community.atlassian.com/t5/Confluence-questions/Is-there-a-way-to-disable-in-line-Comments-on-Wiki-pages/qaq-p/109579, but that relies on a macro being added to the global macros file, and I'd rather not introduce that potential maintenance gotcha. Our ideal solution would be javascript on each page for which we want to disable the inline comments feature.

The reason putting the comments in the macros file is more of a maintenance issue than putting a couple lines of script on every page is that we do not control the macros file but we do control the content that we publish to Confluence using an automated tool, and after the initial change to the publication script, no further effort is required by us to ensure that all pages posted to our release space in the future disallow inline comments.

Thanks in advance.

1 answer

This widget could not be displayed.

Answered my own question with a bit more experimentation.

To do this inline in a page, use this:

<ac:structured-macro ac:macro-id="cfdd18d0-a0f9-4a25-9dd7-e16c9c5a0daa" ac:name="html" ac:schema-version="1">

  <ac:plain-text-body><![CDATA[<style>button[data-key*=inline-comment] { display:none !important;}</style>]]></ac:plain-text-body>

</ac:structured-macro>

Suggest an answer

Log in or Sign up to answer
Community showcase
Posted Monday in Confluence

Why start from scratch? Introducing four new templates for Confluence Cloud

Hi my Community friends!  For those who don't know me, I'm a product marketer on the Confluence Cloud team - nice to meet you! For those of you who do, you know that I've been all up in your Co...

459 views 6 6
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