it causes a javascript error. We are trying to use the editor in a production application, and are constrained to using ie 8.
Please advise.
Jim Meisterich
7 Answers, 1 is accepted
I have tested the paste function inside the Kendo UI Editor running on IE8 and did not observe any discrepancies in the way it is working. As for attached file - I was not able to find it in the ticket.
If the problem still persists, please extract a runnable sample in a jsBin/jsFiddle that we can investigate locally and narrow down the problem.
Regards,
Kiril Nikolov
Telerik

if you create an html file using the markup below, and open that file in your browser, and copy and paste into the demo application, you should be able to see the javascript error.
Thanks in advance for your help,
Jim
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title></title>
</head>
<body>
<FONT color=#0000ff size=2 face=Consolas><FONT color=#0000ff size=2 face=Consolas><FONT color=#0000ff size=2 face=Consolas>
<P>function</FONT></FONT></FONT><FONT size=2 face=Consolas><FONT size=2 face=Consolas> EditorPaste(ev) {</P>
<P></FONT></FONT><FONT color=#0000ff size=2 face=Consolas><FONT color=#0000ff size=2 face=Consolas><FONT color=#0000ff size=2 face=Consolas>debugger</FONT></FONT></FONT><FONT size=2 face=Consolas><FONT size=2 face=Consolas>;</P>
<P></P>
<P></P>
<P></FONT></FONT><FONT color=#0000ff size=2 face=Consolas><FONT color=#0000ff size=2 face=Consolas><FONT color=#0000ff size=2 face=Consolas>var</FONT></FONT></FONT><FONT size=2 face=Consolas><FONT size=2 face=Consolas> editor = $(ev.sender.element).data(</FONT></FONT><FONT color=#800000 size=2 face=Consolas><FONT color=#800000 size=2 face=Consolas><FONT color=#800000 size=2 face=Consolas>"kendoEditor"</FONT></FONT></FONT><FONT size=2 face=Consolas><FONT size=2 face=Consolas>);</P>
<P></FONT></FONT><FONT color=#0000ff size=2 face=Consolas><FONT color=#0000ff size=2 face=Consolas><FONT color=#0000ff size=2 face=Consolas>var</FONT></FONT></FONT><FONT size=2 face=Consolas><FONT size=2 face=Consolas> $content = $(</FONT></FONT><FONT color=#800000 size=2 face=Consolas><FONT color=#800000 size=2 face=Consolas><FONT color=#800000 size=2 face=Consolas>'<span>'</FONT></FONT></FONT><FONT size=2 face=Consolas><FONT size=2 face=Consolas> + ev.html + </FONT></FONT><FONT color=#800000 size=2 face=Consolas><FONT color=#800000 size=2 face=Consolas><FONT color=#800000 size=2 face=Consolas>'</span>'</FONT></FONT></FONT><FONT size=2 face=Consolas><FONT size=2 face=Consolas>);</P>
<P>$content.find(</FONT></FONT><FONT color=#800000 size=2 face=Consolas><FONT color=#800000 size=2 face=Consolas><FONT color=#800000 size=2 face=Consolas>'*'</FONT></FONT></FONT><FONT size=2 face=Consolas><FONT size=2 face=Consolas>).removeAttr(</FONT></FONT><FONT color=#800000 size=2 face=Consolas><FONT color=#800000 size=2 face=Consolas><FONT color=#800000 size=2 face=Consolas>"style"</FONT></FONT></FONT><FONT size=2 face=Consolas><FONT size=2 face=Consolas>);</P>
<P>ev.html = $content.html();</P>
<P></FONT></FONT><FONT color=#006400 size=2 face=Consolas><FONT color=#006400 size=2 face=Consolas><FONT color=#006400 size=2 face=Consolas>// editor.paste(ev.html);</P></FONT></FONT></FONT><FONT size=2 face=Consolas><FONT size=2 face=Consolas>
<P>$content.remove(); </P>
<P></P>
<P>$(ev.sender.document.body).click(); </P>
<P></P>
<P>}</P></FONT></FONT>
</body>
</html>
I have manged to reproduce the problem you are describing. And it comes from the fact that you are pasting an invalid html inside the editor, so it is not possible for it to correctly display the markup. If valid html is pasted inside the editor, it works as expected.
Regards,
Kiril Nikolov
Telerik

We will explore some options about converting the HTML to a valid state (it is invalid in terms of improperly closed tags, which are reported as such by IE8 and break the processing of pasted content). I will follow up with our findings.
Regards,Alex Gyoshev
Telerik
I am glad to inform you that we have managed to pre-process the invalid markup so that it behaves properly in browsers that do not do this automatically. The bug fix will be included in the next internal build, which should be published at the beginning of next week. Please note that the end-result differs slightly in some scenarios, but the editor remains functional (in the example that you posted, the first keyword ("function") is styled by improper nesting of the font tag, which is not handled by the HTML parser).
Regards,Alex Gyoshev
Telerik

I really appreciate your help.
regards,
Jim