Bold word within text field

Is there a way to make a single word (or words) bold within a textfield?
For example: “The boy walked his huge dog.”
How would I tell the code to bold the word huge?

Yes, you can use the setTextFormat method of TextField to format a range of text in the field


Another option is to set the htmlText value instead of the text value. The supported tags can be seen here. Note that depending on the fonts you embedded, your results may vary in making things bold.


I didn’t actually know you could use setTextFormat on a range, thanks!

Awesome. Thanks. I’ll look into how to go about doing that.