Copy link to clipboard
Copied
In Actionscript 3 I could format the text of parts of a text field.
myTextField.setTextFormat(myTextFormat, 3, 6);
How can I do this with Javascript?
I am using jQuery:
$("#myTextField").css('font-size', "20px");
Then it's an HTML input textfield element, and you style it like any other HTML element, using CSS. Animate has no native functionality for this.
Copy link to clipboard
Copied
Are you talking about a component textfield, or a native Animate textfield?
If it's an Animate textfield, in Canvas documents they only support a single text styling for the entire textfield. No mixed formatting. This is an intrinsic limitation of the HTML5 canvas text API (thanks Apple!). To change the properties of the textfield, just assign to the property you want to change, e.g.--
this.myTextField.color = "#FF0000";
Copy link to clipboard
Copied
Thanks ClayUUID,
actually it's an input textfield using the component in Animate.
So it's not actually part of the canvas.
Does this make any difference?
Copy link to clipboard
Copied
Then it's an HTML input textfield element, and you style it like any other HTML element, using CSS. Animate has no native functionality for this.
Find more inspiration, events, and resources on the new Adobe Community
Explore Now