In the workflows, it would be great to have a “this” (or something like it). For instance, when I click on a text…
this.style.color = “red”
In the workflows, it would be great to have a “this” (or something like it). For instance, when I click on a text…
this.style.color = “red”
Neat! Just added your request to our user research
Thanks John!
HI @John,
inside workflow you can access the element through context.element. Its not available in the code explorer (hidden feature), but its here. With a custom javascript action, you can do this
context.element.style.color = "red"
BUT
I strongly discourage that. This element is handle by Weweb (and Vue internally), so your custom changes will probably be erase the next time we try to update your DOM (which happens often).
The best way to achieve what you want is to think data first:
Hope this help
Ah, yes! This is actually very helpful… more so on elements that won’t be updated by DOM. For instance, creating an inline form edit element, I wanted to show a text edit icon when hovering over the parent container. This helps a lot with that. Or getting other children, sibling nodes. thx