On the client side, how to obtain plain text (like serverside's editor.PlainText) that DOES include whitespace entered by the user

  •  12-22-2009, 3:45 PM

    On the client side, how to obtain plain text (like serverside's editor.PlainText) that DOES include whitespace entered by the user

    Using
    innerText(document.getElementById(ID_OF_EDITOR).GetDocument().body) gets the text with html tags stripped out, but also strips carriage returns.  I DO NOT WANT to strip whitespace, but WANT to strip HTML tags.  Is there a way to do this that returns the same result as the server side Editor.PlainText property??
     
    My current idea is to get the editor.getHTML and use a regular expression replace to knock out everything that looks like an html tag, but I'm wondering if there is a better solution.
     
    Thanks,
View Complete Thread
Powered by Community Server (Commercial Edition), by Telligent Systems