Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
78
WebHtmlEditor freezes after pasting data from Excel
posted

Clients have noticed that if they paste rather big selection from Excel to WebHtmlEditor, the IE stops responding.

To make sure that problem doesn't lay somewhere in my code, I used the Infragistics Online Sample Browser to test this behaviour.
I used the "WebHtmlEditor Genral Properties" sample, waited until the page was fully loaded and then pasted an selection from Excel (roughly 22Kb when saved to disk using Notepad)
All the editor dropdown lists stop responding immediately and when test was done with FF it gave an error about script being busy.

 Is there any way to solve this problem,  is it possible to stop WebHtmlEditor from running JavaScripts after pasting text?

Parents
No Data
Reply
  • 275
    posted

    I had a similar problem with users pasting in large text documents from WordPerfect.

    What I did was go through the ig_htmlEditor.js file and look at all the spots where string.replace is being used and changed this to use regular expressions. This improved performance dramatically. My users still find the application very slow when they paste in such large documents but IE doesn't freeze anymore. Look at the cleanWord function specifically. You do this at your own risk though. If you upgrade or apply any hot fixes then you will have to make the change again.

    I also don't allow users to paste in HTML code. See the topic http://news.infragistics.com/forums/t/6519.aspx for implementation details. This is necessary for my application so I don't know how much performance improvement it gives.

    I also implemented the Find/Replace button on the toolbar. This allowed my users to replace extra spacing in the document quickly which made the size a lot smaller. This also improved the performance when opening the page that contained the pasted in data again.

    I hope that helps you.

    Amy

Children