Please help me to get text (non html/ not formatted) from ajax text editor in asp.net i am using vs 2008.
i am using AjaxControlToolkit.HTMLEditor
you can see same kind of at : ajax HtmlEditor
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Well, the documentation on the page you linked to only shows that the
HTMLEditorhas aContentproperty, which is the html text, not the plain text. However, the editor itself, on the page, allows you to view either the rendered html, or the html code (the markup).The editor uses an
<iframe>to contain the rendered html. If you want to get the plain text (no html tags), you’ll have to do it on the clientside. The<iframe>has an id. You could use something like jquery to do this:As long as
someHiddenFieldis an<asp:HiddenField>control, it will contain the plain text of the editor when you post back. You just need to make sure you make the above assignment after you’re done editing the HTMLEditor’s content, but before you actually post back.UPDATE
I answered another similar question, and my first answer might not actually get the text of the
<iframe>. Try this: