View Full Version : HtmlEditor - How to get Plain Text value?

20 Feb 2008, 5:45 AM
Hello All,

Can anyone suggest on how to get the 'plain text' value from the HtmlEditor? I have an application in which the user entered text can be e-mailed later. Depending on user settings they can get either HTML or plain text messages. I would expect the non-html version to be similar to a value extracted from a TextArea.

My apologies if this was already addressed in a different thread. I did my best to lookup but did not find much.

Thanks in advance.

- Kannan

20 Feb 2008, 5:47 AM
Google around and find a regex to strip html: http://zamov.online.fr/EXHTML/DHTML/DHTML_983246.html

20 Feb 2008, 5:48 AM
You would want to do something like this...

var bla = Ext.util.Format.stripTags(your_field.getValue());

20 Feb 2008, 9:52 AM
Thanks a lot guys.

7 May 2013, 11:31 PM
I am using the <ext:Htmleditor> inside a

is that a problem?