Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Disabling Image and Attachment Copy Options

yj_seong October 14, 2024

Hi,

I am looking for a way to disable the checkbox for including images and attachments when copying a Confluence page.

 

It seems that there is no straightforward option to do this directly through the settings.

So, I’m considering using custom HTML to create a similar effect, like this:

<style>         
#copy-attachments-container {            
display: none;        
}
</style>

<script>
function disableCopyAttachments() {  
setTimeout(disableCopyAttachments, 500);
  if ( $('#copy-attachments').is(':checked')) {
setTimeout(function() {$('#copy-attachments').removeAttr('checked');}, 500);
  }
}
disableCopyAttachments();
</script>

 

Is this approach advisable? Additionally, is there a way to apply this modification to a specific space only, rather than globally across all spaces?

1 answer

0 votes
Shawn Doyle - ReleaseTEAM
Community Champion
October 21, 2024

Hi @yj_seong 

Although it might work, I'm not a big fan of trying to supersede the Atlassian menus via CSS. It isn't future-proof, and you are creating an issue for future site admins or even future you. You'd have to experiment to see what works for you.  To limit it to certain spaces, you are already using one if statement in the CSS, you can add more for the Spaces/Pages.

You could take away the add attachment permission in Space settings.  However, that would also limit who can add pictures and attachments in general and not just when copying.  However, if you are only trying to limit this to a few users this may be worth exploring.

 

 

 

 

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
SERVER
PRODUCT PLAN
STANDARD
TAGS
AUG Leaders

Atlassian Community Events