Environment
Provide version numbers for the following components (information can be retrieved by running tns info in your project folder or by inspecting the package.json of the project):
Describe the bug
Bold, Underline, foregroundColor and Italic not working for label
To Reproduce
Take a look at https://play.nativescript.org/?template=play-tsc&id=em8FoW&v=2
Expected behavior
Bold, Underline, foregroundColor and Italic should work as mentioned at https://www.nativescript.org/blog/bolding-italicizing-and-underlining-portions-of-text-in-nativescript
Sample project
https://play.nativescript.org/?template=play-tsc&id=em8FoW&v=2
Additional context
Hi @rakeshgirase,
The described properties in the blog post are deprecated and are no longer supported by the Span. In your scenario, you should replace:
foregroundColor with colorfontAttributes with fontWeightfontAttributes with fontStyleunderline="true" with textDecoration="underline"Check out the API reference here, where are described all styling properties for the Span.
Most helpful comment
Hi @rakeshgirase,
The described properties in the blog post are deprecated and are no longer supported by the
Span. In your scenario, you should replace:foregroundColorwithcolorfontAttributeswithfontWeightfontAttributeswithfontStyleunderline="true"withtextDecoration="underline"For your convenience, I am also attaching the demo with the needed changes.
Check out the API reference here, where are described all styling properties for the Span.