Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Change the default text in the Search Box?

Dan Moran November 10, 2011

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

4 votes
Answer accepted
Sandro Herrmann [Communardo]
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
November 11, 2011

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.

Dan Moran November 13, 2011

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

Victor Prasad November 8, 2018

Any chance this will work with Confluence 6.8.2?

 

Thanks,

 

V

0 votes
Stanislav Kalianov November 13, 2011

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

Dan Moran November 13, 2011

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

0 votes
HuseinA
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
November 12, 2011
0 votes
Remo Siegwart
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
November 11, 2011

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events