How can I customize the text inside the Search Control?

We use the Documentation theme quite a bit and a search control is automatically included on the upper-right of every page. Inside the control, the words "Search Confluence" appears before you actually type any search text in the field. We'd like to change what appears in that control but I can't find what "properties" file contains the text that gets displayed. Any ideas? Thanks.

3 answers

1 accepted

Hi Roy,

You could put the following on the Confluence Admin >> Custom HTML >> At end of the HEAD

<script type="text/javascript">
AJS.toInit(function() {
AJS.$('#quick-search-query').attr('placeholder','Your String Here');

Please change Your String Here to relevant text.

Hope it helps

Thanks both Uday and Rian, this worked (mostly). It solves my basic problem. Unfortuantely, it leaves a little artifact on a space that uses the Adaptavist Theme Builder but that is a small matter. It works prefectly on all the main spaces in our site and is a good technique to recommend to others who are trying to brand their sites. Appreciate the help!

AJS.$("#header .quick-search-query").val("your search Text Here");

You can place this in 'At end of the HEAD' section.

Hope this will help.

Tried it. All that happenned was the "AJS.$("#header.quick-search-query").val("My Search Test");" showed up as a text string above the menu bar. I'm sure I'm doing something wrong, but still looking for a solution.

AJS.toInit(function() {
AJS.$("#header .quick-search-query").val("your search Text Here");
The above code will work. you should add the line betwen toInit() method.
Place the aboce code in custom HTML-->At the end of the Head.

Suggest an answer

Log in or Sign up to answer
Community showcase
Posted Feb 06, 2019 in Confluence

Try out the new editing experience

Hi team, I’m Avinoam, a product manager on Confluence Cloud, and today I’m really excited to let the Community know that all customers can now try out the new editing experience and see some of the ...

1,030 views 51 8
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