I have html text
which is coming from backend
and i need to convert it into normal text to show up in TextArea.
Is there any way to convert Html text into normal plaintext by using
Flex framework`?
I have html text
which is coming from backend
and i need to convert it into normal text to show up in TextArea.
Is there any way to convert Html text into normal plaintext by using
Flex framework`?
You will have to use Regexp to remove tags.
From here:
var myString:String = "<p><b>bold</b> <i>italic</i> <a href='#'>link</a> <br>linebreak</p>";
trace(myString)
var removeHtmlRegExp:RegExp = new RegExp("<[^<]+?>", "gi");
myString = myString.replace(removeHtmlRegExp, "");
trace(myString);
// OUTPUT
// <p><b>bold</b> <i>italic</i> <a href='#'>link</a> <br>linebreak</p>
// bold italic link linebreak
In case I got you wrong and you want to display HTML tags in textarea, use escape()
function