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

[Solved] MVC Telerik Editor Render html code

3 Answers 59 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.
Hiral
Top achievements
Rank 1
Hiral asked on 19 Apr 2011, 01:52 PM
Hi,

I have a problem regarding Editor control in my mvc 3.0 project. In a page, I have Editor control and upload file functionality. when i am trying to upload file, editor text are converted to html format. This problem only occurs in IE 9.0. In IE 8 and Mozila it works.

Please suggest me solution for this.

Thanks,

Hiral Patel

3 Answers, 1 is accepted

Sort by
0
Stephen
Top achievements
Rank 1
answered on 17 Nov 2011, 12:30 PM
I am having the same problem, did you manage to work out the cause?
0
Stephen
Top achievements
Rank 1
answered on 18 Nov 2011, 02:15 PM
Found a work around for my problem, I have both a editor and a upload control on the page, after the upload has completed and the javascript function is called to update the page content the contents in the editor is converted to the html contents.

Here is what i put on the javascript function, basicly created an array and got the contents from the editors, make the html update, then put back the text into the editors.

$.post(
            Url,
            targetData,
            function (data) {
                var htmlArray = new Array();
                
                $(".editor").each(function (index) {
                    htmlArray.push($(this).data('tEditor').value());
                });
                $("#" + d.Target).html(data);
                $("editor").each(function (index) {
                    $(this).data('tEditor').value(htmlArray[index]);
                });
                 
            }
            );

Steve
0
Petur Subev
Telerik team
answered on 22 Nov 2011, 11:59 AM
Hi Stephen,

We tried the scenario that you described but were not able to reproduce the problem. I see that you've already found a workaround on your side, but if you have time, we will appreciate it if you send us a sample that reproduces the original problem. We will check it and fix our code if necessary.


Best wishes,
Pesho
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the Telerik Extensions for ASP.MET MVC, subscribe to their blog feed now
Tags
Editor
Asked by
Hiral
Top achievements
Rank 1
Answers by
Stephen
Top achievements
Rank 1
Petur Subev
Telerik team
Share this question
or