christophernoel / ext-ux-htmleditor-plugins

Automatically exported from code.google.com/p/ext-ux-htmleditor-plugins
0 stars 0 forks source link

Improve Word Paste format remove #10

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Paste a large text from word

What is the expected output? What do you see instead?
sometimes, Word breaks the text of a span with a carriage return. Based on how 
the extension is scheduled to remove the format, all carriage returns are 
removed, sometimes joining words.

This is solved by putting the following before the other substitutions:

wordPaste = wordPaste.replace(/[\r\n]+(?=(?:(?!<span\b)[\s\S])*<\/span>)/ig, " 
");

sorry for my bad english.
santiago.

Original issue reported on code.google.com by santiago...@gmail.com on 11 Aug 2010 at 3:13