I am getting the data from textarea using
tinyMce.get(“id”).getContent().
but i am getting
1234
this data from above code.
i dont want any html tags.i want only data what we entered in textarea.
how to get that data?
Ravi,
First off, this would probably be a better question for a Javascript
mailing list as this isn’t really a rails-specific question.
In an effort to help you out, you’ll probably want to look at building
an observer with javascript (using prototype.js) and validate that
characters are non-numeric. I’m not sure how TinyMCE works completely,
but it sounds like it’ll generate the html as you’re using it but I’d
suspect that it’d key a variable in it’s namespace with the original
content so that it could continue to reformat properly. Perhaps it’s
has an html escape function that you could call to strip out the html.
Anyhow, that’s how I’d go about looking to create a solution to your
goal.
Cheers,
Robby
–
Robby R.
Chief Evangelist, Partner
PLANET ARGON, LLC
design // development // hosting