How can I update the inner content of an Element using trait manager? #5793
Unanswered
itsemon245
asked this question in
Q&A
Replies: 1 comment
-
You can create a trait with custom logic traits: [
{
name: 'custom-trait-update-html',
getValue: ({ component }) => {
// The value is the inner HTML content
return component.getInnerHTML();
},
setValue: ({ component, value }) => {
// Update the inner HTML with a new value
component.components(value);
}
}
] |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I was wondering how to update the innerContent of a link component or a tag in grapes js using the trait manager
For example:
Change this text
Change this label
Beta Was this translation helpful? Give feedback.
All reactions