I'm trying to make part of a string bold using the label component. On the "Binding Preview" it seems to be working, but on browser it's not.
Any help there?
I'm trying to make part of a string bold using the label component. On the "Binding Preview" it seems to be working, but on browser it's not.
Any help there?
Don't use html in the string to accomplish this. Rather, use a style on the label.
I have to. I want to do something like this, without using two label components.
Is using Markdown component an option, that may be easier to use.
Why? Personal goal?
Seriously this seems like an odd requierment.
The markdown component is the only (intended) way to do this with a single component that I am aware of.
Honestly though, for what you're doing (unless there is more you haven't explained), I would just use two labels, and then group them together if you want to be able to move them around together.
Thanks for the tip. I tried using Markdown, but is doing the same thing.
am I missing something?
Follow the doc
It uses the same markdown as this forum. Try,
Recipe: **Potato**
Result:
Recipe: Potato
Either you need to use markdown, or you need to uncheck props.markdown.escapeHtml
so, I dont want to use two labels for two reasons:
I know it's possible to add the html to labels after reading this (HTML in Ignition | Ignition User Manual) but I don't know what I'm doing wrong.
Another reason is that, I have some other labels that I can use this, that there's more than one word converted to bold. If I figure this out, I can apply that to other things, without adding a bunch of labels.
That is specific to the Vision Module, it does not apply to perspective, as the components in perspective are not Java Swing components.
Only options without getting crazy are:
After unchecking the escapeHtml it worked. Thank you guys!!!
First thing, make sure you're reading the manual for the version of the software you're actually using:
Second thing, you really shouldn't use HTML/the escapeHTML
property for this. It's just as easy to write an expression to output Recipe: **Potato**
as it is to output the HTML, and it's a whole lot easier to read. You're also guaranteed to be in a sane subset of text formatting operations, rather than opening the door to literally any HTML.
Last main thing - it may or may not even be a good idea to do this text formatting inline at all. A repeated stack of X: Y
relationships might be better represented with a table, and it's trivially easy to format each column in a table differently.
This is just a bug, by the way, and I've filed a ticket to get it fixed.
I'll try that.
Thank you very much, I'll keep that in mind!
I reconsidered, and tried this, and it worked as well. Thanks you!