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

Helen OBoyle October 19, 2017

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

0 votes
Helen OBoyle October 19, 2017

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>

Vishnu M January 30, 2020

Where we need to use this query in HTML macro ?

WW
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.
March 8, 2023
ac:name="html"

That means it's an HTML macro with this in the body:

<style>button[data-key*=inline-comment] { display:none !important;}</style>
Tupling October 3, 2023

You can accomplish this with CSS in the style sheet or HTML Macro if you want it page dependent.

#view-inline-comment-button{

display: none;

}

if in a HTML Macro you must include 

<style>

#view-inline-comment-button{

display: none;

}


</style>

Like # people like this

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events