I can open a word document, then select all, copy, and paste into WebHtmlEditor. The good news: it does what you'd want - i.e., you get the WordHtml version your document, with much the same formatting. But the bad news: it seems to take *virtually forever* to render within the HTMLeditor. Like, minutes for a one-page word document.
I realize the Word's version of html is a little strange, that it has a lot of extra stuff, etc. But geez, is it really that complicated? BTW, MSIE manages to render the same HTML with little ado.
Any ideas?
-Scott
In my opinion, you are treading down a trecherous path allowing folks to paste in anything from Word or Excel into an IG WebHtmlEditor.
I have spent many hours talking to support and other folks about these same kind of problems. I had problems with folks pasting in Excel spreadsheets and everything else. Morons.
I finally have taken steps to remove all HTML formatting on pasting into IG WebHtmlEditors....
Here is a code snippet to achieve this goal:
// Following block of code is here to prevent pasting of HTML into the
// IG RTB's. iged_strip is an internal routine used by IG to strip HTML from
// textboxes. It is being accessed here at the risk of IG changing their CSOM
// in the future.
oEditor._addLsnr(oEditor._elem, "beforepaste", myPreventPaste)
oEditor._addLsnr(oEditor._elem, "paste", myPaste)
//debugger;
event.returnValue = false
}
cd = window.clipboardData
//cd.getData("Text").toString()
txt = iged_stripTags(txt);
oEditor._alert();
Alan,
Where do you put the above block of code? Is this code triggered on certain event?
Thanks,
Sorry, I wrote this code for an IE only Intranet environment so I never had to make it firefox friendly.
I believe the problem is where the text is retrieved from the clipboard and converted to text only. You'll have to do a little research into how firefox does this differently from IE. A quick google search should give you an answer. Search on window.clipboardData and getData
Good Luck.
Amy
But this code does not work on Firefox. Did you try to resolve it on Firefox? Thanks,
Put this code in the init event of your editor.