Is there any chance to force editor to write log when they save the page?

Is there any chance to force editor to write log when they save the page?

We want record all change comment.

4 answers

1 vote
Davin Studer Community Champion Sep 10, 2015

What if you did something like this. You could add it to the custom html section in confluence admin, or to the page decorator.

<script type="text/javascript">
AJS.toInit(function(){
	AJS.$('#rte-button-publish').click(function(e){
		var comment = AJS.$('#versionComment').val();
		var inEditMode = AJS.$('body').hasClass('contenteditor') ? true : false;

		if(comment === '' && inEditMode) {
			e.preventDefault();
 
			var dialog = new AJS.Dialog({
				width:400, 
				height:200, 
				id:"comment-required", 
				closeOnOutsideClick: false
			});			
			dialog.addHeader("Comment Required");
			dialog.addPanel("Panel 1", "<p>You must enter a comment to save the page.</p>", "panel-body");			
			dialog.addButton("Ok", function (dialog) {
				dialog.remove();
			});			
			dialog.gotoPage(0);
			dialog.gotoPanel(0);
			dialog.show();
		}
	});
});
</script>
0 vote

No, you can't do that.  It goes against the principles of "just get on and write" that Atlassian want for Confluence too, so you'll never see it in the core product.  I don't think there's any add-on to provide it either.

0 vote
Davin Studer Community Champion Sep 08, 2015

What version are you on?

Hi, Our version is 5.6.5

Suggest an answer

Log in or Sign up to answer
Atlassian Community Anniversary

Happy Anniversary, Atlassian Community!

This community is celebrating its one-year anniversary and Atlassian co-founder Mike Cannon-Brookes has all the feels.

Read more
Community showcase
Kesha Thillainayagam
Posted Apr 13, 2018 in Confluence

We want to hear how your non-technical teams are using Confluence!

Hi Community! Kesha (kay-sha) from the Confluence marketing team here! Can you share stories with us on how your non-technical (think Marketing, Sales, HR, legal, etc.) teams are using Confluen...

2,944 views 27 12
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