We found an issue when using the "paste from Word" plugin, we tried pasting an ordered list from MS Word, and the numbers were missing on the editor. We were looking at the code to find out why it was happening, and noticed that MS Word generates a style with negative indent.
Which resulted in the numbers not displaying on the editor because the indentation leaves the text outside of the box.
We belive that one quick hack is to modify the plugin file "pastefromword.js" in lines 45 and 46 with the following:
With that we filter out the negative indents.
We are not sure that this solution is safe, will it impact on other parts of this plugin?
If so, Is there any better solution to this issue?
<p class="MsoListParagraphCxSpFirst" style="text-indent: -18pt;"><span style=""><span style="">1.
Which resulted in the numbers not displaying on the editor because the indentation leaves the text outside of the box.
We belive that one quick hack is to modify the plugin file "pastefromword.js" in lines 45 and 46 with the following:
html = html.replace( /\s*TEXT-INDENT: -\d+(?:pt|cm);\s*;/gi, '' ) ; html = html.replace( /\s*TEXT-INDENT: -\d+(?:pt|cm)\s*"/gi, "\"" ) ;
With that we filter out the negative indents.
We are not sure that this solution is safe, will it impact on other parts of this plugin?
If so, Is there any better solution to this issue?