htmlText (propriété TextField.htmlText)

public htmlText : String

Si le champ texte est un champ texte HTML, cette propriété contient la représentation HTML du contenu du champ texte. Si le champ texte n'est pas un champ texte HTML, son comportement est identique à la propriété du text. Vous pouvez indiquer qu'un champ texte est un champ texte HTML dans l'inspecteur Propriétés ou en définissant la propriété html du champ texte sur true.

Disponibilité : ActionScript 1.0 ; Flash Lite 2.0

Exemple

L'exemple suivant crée un champ texte qui définit la propriété html sur true. Le texte au format HTML s'affiche dans le champ texte.

this.createTextField("my_txt", this.getNextHighestDepth(), 10, 10, 160, 22);
my_txt.html = true;
my_txt.htmlText = "<b> this is bold text </b>";

Voir aussi

html (propriété TextField.html)