Mandatory labels in Confluence


Is there an option to ensure a label must be entered into the editor with confluence 5.2?

I have read other articles and there does not appear to be any concrete solution to this.

We can instruct users to fill out the label field but it would be nice if they could not save until atleast 1 is entered.

Thank you!

2 answers

1 accepted

This widget could not be displayed.

One of our developers put the following into the theme javascript file:

Hope this helps someone else.

$(document).on("click", "#rte-button-publish", function(e) {
            var labelbutton = $("#rte-button-labels");
            if($(labelbutton).length > 0)
                if($(labelbutton).find(".trigger-text").text() == "Labels")
                    alert("Page requires at least one or more labels");

/* CSS to not let last label be removed */
.aui-label.aui-label-closeable:last-child:first-child {
    padding-right: 5px;
    position: relative;

.aui-label.aui-label-closeable:last-child:first-child .aui-label-split-close {
    display: none;

This is what I am looking for

It would be great to know which file I need to edit 

This widget could not be displayed.
Davin Studer Community Champion Dec 04, 2013

Nope. No option for that. You could write a plugin for it, or maybe write a Speakeasy extension for it.

Thanks Davin.

Anybody have code samples for this?

Hi. Could the above css be extended to remove the 'x' for labels containing a certain value? Thanks.

Davin Studer Community Champion Nov 12, 2014

Not with just CSS no. You would need to use JavaScript for that. With CSS 4 you could do it, but nothing supports CSS 4 yet.

Suggest an answer

Log in or Sign up to answer
Community showcase
Posted Monday in Confluence

Why start from scratch? Introducing four new templates for Confluence Cloud

Hi my Community friends!  For those who don't know me, I'm a product marketer on the Confluence Cloud team - nice to meet you! For those of you who do, you know that I've been all up in your Co...

473 views 6 6
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