Results 1 to 5 of 5

Thread: HtmlEditor - How to get Plain Text value?

  1. #1
    Ext User
    Join Date
    Jan 2008
    Posts
    21
    Vote Rating
    0
      0  

    Default HtmlEditor - How to get Plain Text value?

    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

  2. #2
    Sencha - Ext JS Dev Team evant's Avatar
    Join Date
    Apr 2007
    Location
    Sydney, Australia
    Posts
    18,600
    Vote Rating
    874
      0  

    Default

    Google around and find a regex to strip html: http://zamov.online.fr/EXHTML/DHTML/DHTML_983246.html

  3. #3
    Sencha User VinylFox's Avatar
    Join Date
    Mar 2007
    Location
    Baltimore, MD
    Posts
    1,501
    Vote Rating
    8
      0  

    Default

    You would want to do something like this...

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

  4. #4
    Ext User
    Join Date
    Jan 2008
    Posts
    21
    Vote Rating
    0
      0  

    Default Thanks!

    Thanks a lot guys.

  5. #5
    Sencha User
    Join Date
    May 2013
    Posts
    1
    Vote Rating
    0
      0  

    Default Still not able to get plain text

    I am using the <ext:Htmleditor> inside a
    <ext.window><content>

    is that a problem?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •