How to get only text from html editor with out html tags?

  1. #1

    How to get only text from html editor with out html tags?

    Hi All

    I used the below line to get only text with out html tags in java script. But it is working only in IE
    var homepageaddress = HtmlEditor1.getEditorBody().outerText
    would you provide me java script code for Get only text from html editor with out tags to work all browsers.(i.e IE, Mozilla, Google Chrome)

    Thanks You very much
    Last edited by Daniil; Oct 03, 2012 at 9:50 AM. Reason: Please use [CODE] tags
  2. #2
    Hi @i3class,

    Are you considering it a bug?

    Please post any technical support on the Help forums.

    What version do you use?

    Please clarify why do you use HtmlEditor if you need just text without HTML?
  3. #3

    Please help me how to get only text from html editor using javascript which runs under all browsers

    Quote Originally Posted by Daniil View Post
    Hi @i3class,

    Are you considering it a bug?

    Please post any technical support on the Help forums.

    What version do you use?

    Please clarify why do you use HtmlEditor if you need just text without HTML?


    Hi Danil
    i am feeling that that's bug.
    I will post but help me how to get only text from html editor using java script which runs under all browsers.
    Its a great help to me.
  4. #4
    It seems you missed these questions.

    Quote Originally Posted by Daniil View Post
    What version do you use?

    Please clarify why do you use HtmlEditor if you need just text without HTML?
    Quote Originally Posted by i3class View Post
    i am feeling that that's bug.
    I will post but help me how to get only text from html editor using java script which runs under all browsers.
    Well, the outerText property appeared in IE and I can't see this property in W3C standard. So, I don't think it is a bug. At least, it is 100% not an Ext.NET bug.

    I would look it up on the internet an analog of outerText in other browsers. Probably, it will be innerText or/and textContent.
  5. #5

    Sorry for that.I want to validate the html editor text from client side.

    Quote Originally Posted by Daniil View Post
    It seems you missed these questions.





    Well, the outerText property appeared in IE and I can't see this property in W3C standard. So, I don't think it is a bug. At least, it is 100% not an Ext.NET bug.

    I would look it up on the internet an analog of outerText in other browsers. Probably, it will be innerText or/and textContent.


    Hi Danil

    Sorry for that

    i am using 1.2 Version.

    I want to validate the html editor text on client side so that's why i want only text with out tags using java script.
    Last edited by i3class; Oct 04, 2012 at 9:06 AM. Reason: spelling mistakes
  6. #6
    Thank you for the answers.

    Quote Originally Posted by i3class View Post
    i am using 1.2 Version.
    Quote Originally Posted by i3class View Post
    I want to validate the html editor text on client side so that's why i want only text with out tags using java script.
    Ok, got it.
  7. #7

    Please provide me answer for how to get only text using javascript.

    Quote Originally Posted by Daniil View Post
    Thank you for the answers.





    Ok, got it.
    Hi Dail

    Its my pleasure.
    Please provide me answer for how to get only text using javascript.

    Its a great help to me.
  8. #8
    Please review this comment.

    Quote Originally Posted by Daniil View Post
    I would look it up on the internet an analog of outerText in other browsers. Probably, it will be innerText or/and textContent.
  9. #9

    I tried those properties but did not work

    Quote Originally Posted by Daniil View Post
    Please review this comment.
    Hi Danil

    I tried with innerText/ textContent properties but did not work in all browsers.

    HtmlEditor1.getEditorBody().innerText is worked in only Google chrome and IE browsers but not in Mozilla Firefox browser

    HtmlEditor1.getEditorBody().textContent is worked in only Google chrome and Mozilla Firefox but not in IE browser.

    So please provide me code which works under all browsers. That's great help to me.
  10. #10
    Please use the Ext.isIE, Ext.isChrome, Ext.isGecko methods.
    http://docs.sencha.com/ext-js/3-4/#!...-property-isIE
    http://docs.sencha.com/ext-js/3-4/#!...perty-isChrome
    http://docs.sencha.com/ext-js/3-4/#!...operty-isGecko

    To determine what exactly property to use.

Similar Threads

  1. [CLOSED] Html editor text update
    By SymSure in forum 1.x Legacy Premium Help
    Replies: 1
    Last Post: Feb 08, 2012, 8:35 AM
  2. [CLOSED] Not able to Copy the Text from HTML Editor
    By speedstepmem3 in forum 1.x Legacy Premium Help
    Replies: 1
    Last Post: Nov 21, 2011, 8:10 AM
  3. Replies: 1
    Last Post: May 28, 2010, 1:13 PM
  4. html editor highlight and text color buttons
    By [WP]joju in forum 1.x Help
    Replies: 5
    Last Post: May 06, 2010, 8:38 AM
  5. HTMl Editor Clear Text.
    By grmontero in forum 1.x Help
    Replies: 3
    Last Post: Oct 01, 2009, 7:49 PM

Posting Permissions