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.
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>
Where we need to use this query in HTML macro ?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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>
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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>
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.