Topbar
Topbar
Sign in
|
Join
|
Client Center
Home
Products
Client Center
Contact
Purchase
Support forums
»
Products
»
Cute Editor for .NET
»
On the client side, how to obtain plain text (like serverside's editor.PlainText) that DOES include whitespace entered by the user
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
robertandrews
Joined on 12-22-2009
Posts 1
On the client side, how to obtain plain text (like serverside's editor.PlainText) that DOES include whitespace entered by the user
Reply
Quote
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,
Filed under:
javascript
,
Cute Editor
,
Strip HTML
,
Client Side Object Model
,
PlainText
,
Regular Expressions
,
CSOM
,
CuteEditor_OnChange
,
plain text
View Complete Thread