Hey all,
What's the best way to add a drop shadow using Velo on EditorX? Right now I have this:
$w("#text3").html = "<p style='word-spacing: 4px;filter: drop-shadow(1px 1px 5px #000000)'>TEXT</p>"
Which works, but when I try this...
$w("#text3").html = "<p style='word-spacing: 4px;filter: drop-shadow(1px 1px 5px #000000)'>${$w("#text3").text}</p>";
It doesn't work, any idea why? I'd like to just use the #text3 variable rather than writing the text out in the .js
Thanks!
- Chris
Answered this on SO a while ago: https://stackoverflow.com/questions/66755192/how-to-add-drop-shadow-in-wix-editor-x/67288403#67288403
Hi there ..
The problem here is the quotations, he's inserting a value as a regular text, it's an undefined inline attribute, therefore an error will always occur.
When you want to insert an inline value, use the (``) quotations instead of (' ') or (" ").
Try this instead:
$w("#text3").html = `<p style='word-spacing: 4px;filter: text-shadow(1px 1px 5px #000000)'>${$w("#text3").text}</p>`;
Let me know if this helped.
You are looking for ---> "text-shadow"?
$w("#text3").html ="<p style='word-spacing: 4px;filter: text-shadow(1px 1px 5px #000000)'>${$w("#text3").text}</p>";