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

Text is decoded on .aspx page

3 Answers 140 Views
Editor
This is a migrated thread and some comments may be shown as answers.
Jeremy
Top achievements
Rank 1
Jeremy asked on 15 Mar 2012, 01:57 AM
Hi everybody!

I decided to slap this new Editor over an existing text area and see how it goes.  

I have a .aspx page with a text box 

<asp:TextBox ID="txtCreativeNotes" runat="server" Rows="5" TextMode="MultiLine" Width="420px" ClientIDMode="Static"></asp:TextBox>

So I

$(document).ready(function () {
 
    $("#txtCreativeNotes").kendoEditor();

and it worked perfectly!

Then, I submitted the form using normal .aspx posting.

but on refresh the data renders in the editor as 

<span style="color:#880015;">This is </span><strong><span style="font-family:'Courier New',Courier,monospace;color:#880015;">sparta</span></strong>

(This is also exactly what it looks like in the SQL database.)

3 Answers, 1 is accepted

Sort by
0
Jeremy
Top achievements
Rank 1
answered on 27 Mar 2012, 07:09 PM
It's been 2 weeks. Can I at least get a courtesy "can not reproduce"?

I have created a simple .net sample application demonstrating the issue.  The link is here:

http://dl.dropbox.com/u/5311491/KendoEditorSample.zip



0
Hai
Top achievements
Rank 1
answered on 19 May 2012, 12:38 PM
Same issue in MVC3 with HTML5, please help me.
0
Jeff
Top achievements
Rank 1
answered on 31 May 2012, 12:19 AM
Maybe I'm not understanding what the problem is, but it looks like you're trying to insert HTML directly into the text editor which is why it's encoding it. The sample you provided looks like it's working as intended.

If you want to insert HTML, you could use the provided insertHtml tool:

$("#editor").kendoEditor({
     tools: [
     "insertHtml",
     ],
     insertHtml: [
         { text: "label 1", value: "<p>snippet 1</p>" },
         { text: "label 2", value: "<p>snippet 2</p>" }
     ]
 });
Tags
Editor
Asked by
Jeremy
Top achievements
Rank 1
Answers by
Jeremy
Top achievements
Rank 1
Hai
Top achievements
Rank 1
Jeff
Top achievements
Rank 1
Share this question
or