It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Can I change the background color of zoom lense in livesearch macro

Can I change the background color of zoom lense in livesearch macro

1 answer

0 votes
Dominic_Lagger Community Leader Dec 04, 2019

Hi @Sridevi Dwaraganath 

Out of the box, this isn't possible.

The only way I could think of, would be an user macro, which includes the live macro and some javascript and css, where you would change the background-color.

Are you familiar with User Macros, Javascript and CSS? 

Regards, Dominic

Hi @Dominic_Lagger ,

   Thanks for the reply, Nope i am not familiar, sample code will be of real help.

Dominic_Lagger Community Leader Dec 05, 2019

Hi @Sridevi Dwaraganath 

This is a possible user macro:

## Macro title: Live Search Colored
## Macro has a body: N
##
## Developed by: Dominic
## Date created: 05/12/2019
## Installed by: Dominic

## This is an example macro
## @param Color:title=Color|type=string|default=red|desc=Color by name or by HEX

<div id="livesearchmacro">
<ac:structured-macro ac:name="livesearch" ac:schema-version="1" ac:macro-id="842a4a89-897c-419a-b917-b84087bd1281">
<ac:parameter ac:name="size">large</ac:parameter>
<ac:parameter ac:name="placeholder">Live search</ac:parameter>
</ac:structured-macro>
</div>
<script>
var input = document.getElementById("livesearchmacro").getElementsByClassName("text")[0]
input.style.backgroundColor = "$paramColor"
</script>

Note:

  • The user macro just includes the "Live Search" macro in "Storage Format"
  • If you want other options from the "Live Search" macro, just copy the generated storage format into this user macro

Hope this helps. Let me know, when you have further questions

Regards, Dominic

I dont know why i am not able to see user macro :-( in confluence. Version which i am using is 6.13.6. For now i hacked it a bit like this using div style

 

<div style="vertical-align: top;width: 280.0px;border-radius: 5.0px;background-color: rgb(236,237,240);">
<ac:structured-macro ac:macro-id="0b124fdb-5328-4c1c-878b-0c931f1c721f" ac:name="livesearch" ac:schema-version="1">
</ac:structured-macro>
</div>

Dominic_Lagger Community Leader Dec 05, 2019

For user macros you need to be an administrator. 

See the documentation here: https://confluence.atlassian.com/doc/writing-user-macros-4485.html

Suggest an answer

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

What project did you transition or start on Confluence with the shift to remote work?

It’s been great to hear from fellow users over the last few weeks about the best tips and fun moments you’ve had working on Confluence since the transition to working remote. I’d love to keep the c...

109 views 3 7
Join discussion

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you