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?
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.