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:

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

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>


Suggest an answer

Log in or Sign up to answer
Community showcase
Posted Feb 06, 2019 in Confluence

Try out the new editing experience

Hi team, I’m Avinoam, a product manager on Confluence Cloud, and today I’m really excited to let the Community know that all customers can now try out the new editing experience and see some of the ...

1,369 views 99 8
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