Change the default text in the Search Box?

The default text in the Confluence Search Box is : Search Confluence.

How can I change this text?

I'm using the Documentation Theme.

4 answers

1 accepted

Hello,

and javascript again iss your friend.

Insert the following code in the Confleunce Administration > Custom HTML > "At the end of the BODY" - part

<script type="text/javascript">

AJS.toInit(function ($) {
        var search = jQuery(".quick-search-query");
        search.each(function() {
            searchBox = jQuery(this);
            searchBox.data("quicksearch", {
                placeholder: "My Test Value",
                placeholded: true
            });
            searchBox.trigger("focus");
            searchBox.trigger("blur");
        });

       

});

</script>

The Placeholder Vlaue "My Test Value" should be set. Testet it with a Confluence 4.0.4. Hope that works for you.

Thanks, Sandro - this script works great in my version of Confluence!

Sorry about the duplicate questions - I wasn't aware that the first one was accepted. Then this weekend I began receiving answers for both. And different answers at that! But yours was the simplest and it worked.

Thanks again,

Dan

I think it might be easier to follow the Confluence documentation regarding changes to interface text:

http://confluence.atlassian.com/display/DOC/Modify+Confluence+Interface+Text

Hi Stanislav,

Thanks for your reply. I got a lot of great answesr from everyone, but for me, Sandro's was the easiest to apply. I didn't have to leave the UI - just plug in the script and it's done.

Dan

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,768 views 26 10
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