Quote from
luishp on July 6, 2019, 9:53 am
Hi @ronnie,
Please, try this:
GetObjectHTML "Paragraph1" [myText]
SetVar [word] "apple"
StrReplace "[myText]" "[word]" "<span style='color:red'>[word]</span>" [myText] ""
SetObjectHTML "Paragraph1" "[myText]"
In the (soon to be released) new version there will two new commands: GetObjectText and SetObjectText to get and set the text content without HTML tags.
Better than this, you can add a CSS class in Project > Properties > Styles like this one:
.coloredWord{
color:red;
font-weight:bold;
}
And then use this code:
GetObjectHTML "Paragraph1" [myText]
SetVar [word] "apple"
StrReplace "[myText]" "[word]" "<span class='coloredWord'>[word]</span>" [myText] ""
SetObjectHTML "Paragraph1" "[myText]"
Sample app attached.
Regards.
Hi @ronnie,
Please, try this:
GetObjectHTML "Paragraph1" [myText]
SetVar [word] "apple"
StrReplace "[myText]" "[word]" "<span style='color:red'>[word]</span>" [myText] ""
SetObjectHTML "Paragraph1" "[myText]"
In the (soon to be released) new version there will two new commands: GetObjectText and SetObjectText to get and set the text content without HTML tags.
Better than this, you can add a CSS class in Project > Properties > Styles like this one:
.coloredWord{
color:red;
font-weight:bold;
}
And then use this code:
GetObjectHTML "Paragraph1" [myText]
SetVar [word] "apple"
StrReplace "[myText]" "[word]" "<span class='coloredWord'>[word]</span>" [myText] ""
SetObjectHTML "Paragraph1" "[myText]"
Sample app attached.
Regards.
Uploaded files:- You need to login to have access to uploads.
asmat has reacted to this post.