This is a migrated thread and some comments may be shown as answers.

[Solved] How i can get plain text from Telerik MVC Editor Control

1 Answer 43 Views
Editor
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Hasibul
Top achievements
Rank 1
Hasibul asked on 07 Sep 2011, 10:50 AM
I need to get only plain text(without html tag and html code) from Telerik MVC Editor.
I have tried
$('#txtEditor').data("tEditor").text()
but it doesn't  work.
Waiting for your help..

1 Answer, 1 is accepted

Sort by
0
Dimo
Telerik team
answered on 07 Sep 2011, 11:23 AM
Hello Hasibul,

You can get the Editor's value with its value() method and then use some Javascript to strip the HTML tags, e.g.

http://stackoverflow.com/questions/822452/strip-html-from-text-javascript

On a side note, if you always need the value in plain text, probably it is better and easier to use a <textarea> instead.

Best wishes,
Dimo
the Telerik team

Thank you for being the most amazing .NET community! Your unfailing support is what helps us charge forward! We'd appreciate your vote for Telerik in this year's DevProConnections Awards. We are competing in mind-blowing 20 categories and every vote counts! VOTE for Telerik NOW >>

Tags
Editor
Asked by
Hasibul
Top achievements
Rank 1
Answers by
Dimo
Telerik team
Share this question
or