PDA

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



kannanth
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

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

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


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

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

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

is that a problem?