Skip to main content
Solved

Is it possible to change the style of a textNode that is inside an instance?


Lucas_Miqueias

Hi guys.

I need to change some specific texts within a text node that is within an instance.
Is this possible via API?

Best answer by tank666

The fontWeight property is read-only. To change the fontWeight, you need to change fontName.style using the above methods.

View original
This topic has been closed for replies.

4 replies

tank666
  • 4873 replies
  • January 10, 2024

Yes, of course you can change the font style. You need to use the setRangeFontName or setRangeTextStyleId methods.


Lucas_Miqueias

How?

Because in documentation

setRageFontName wait font name.
setRageTextStyleId wait a string.

I need to change font-weight in a range.


tank666
  • 4873 replies
  • Answer
  • January 10, 2024

The fontWeight property is read-only. To change the fontWeight, you need to change fontName.style using the above methods.


Lucas_Miqueias

Thank you!

This works for me.


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings