Is it possible to change the color of the highlight when I select a text? If so, how to do it?
Thank you a lot,
GC
Is it possible to change the color of the highlight when I select a text? If so, how to do it?
Thank you a lot,
GC
What text? Using what screen element?
Note that this forum is dedicated to Corvid. For questions regarding the use of screen elements, please contact Wix Customer Care , as they know best.
man i wanna know that too, did you find out how to do it yet?
What is it that you are trying to accomplish? What text, in what screen element? What have you tried so far?
@yisrael-wix We want for a text on a website to have a specific highlighted color when a viewer selects it. E.g, when you select a text to copy it. We don’t like the standard blue highlight.
@jaydeepsingh178 This requires DOM access. At this moment, we can only use $w to access them. Please try using “Custom Elements” to build your own element with custom CSS. In addition, you can try (not 100% able)add CSS code with HTML format in the “Tracking and Analysis” panel (between )
In addition to what Certified correctly explained…
For a TextBox , you could use the onMouseIn() and onMouseOut() event handlers which you can then set the TextBox style property .
If you are using the Text element, you can use the mouse event handlers, and then use HTML to style the text the way you want.
first you need to upgrade plan to activate Custom Code in the backend.
Settings>Custom Code
::-moz-selection { /* Code for Firefox */ background: yellow; } ::selection { background: yellow; }you need to input this into Head area of custom code
Thanks! It was exactly what I was looking for. Any way to invert the text color after selection? I have chosen a yellow selection, but now my white text isn’t very readable. It would be great if the white could be inverted to black.