This question is locked. New answers and comments are not allowed.
I'm trying to get the text out of the radEditor to fill a textarea.
The first issue is that the .value() method returns me the html (can get around with jquery.text()).
The second issue is that the html that is being returned to me isn't paragraph formatted. it's just plain, so i'm losing any line breaks in the text when i use the jquery .text() function. The behaviour of the telerik mvc demo is different, but i can't see why.
Is there a way of fixing the formatblock to ensure all text is <p> wrapped?
Is there a telerik method for getting the text (not html), or should i keep going with the jquery text method?
The first issue is that the .value() method returns me the html (can get around with jquery.text()).
The second issue is that the html that is being returned to me isn't paragraph formatted. it's just plain, so i'm losing any line breaks in the text when i use the jquery .text() function. The behaviour of the telerik mvc demo is different, but i can't see why.
<% Html.Telerik().Editor().Name("Description").Value(Model.Description).Tools(Sub(tools)tools.clear()tools.Bold().Italic().Underline().Strikethrough()tools.Separator()tools.InsertOrderedList().InsertUnorderedList()tools.Separator()tools.CreateLink().Unlink()tools.FormatBlock(Sub(formats) formats.Add("Paragraph", "p") End Sub)End Sub).Render()%>var radEditor = $(this).find('table').data('tEditor');var radHtml = radEditor.value();var radText = $(radHtml).text(); alert(radHtml);alert(radText);Is there a way of fixing the formatblock to ensure all text is <p> wrapped?
Is there a telerik method for getting the text (not html), or should i keep going with the jquery text method?