spocke wrote:This is excellent work. I guess the conflict with the middot/list conversion is due to that logic excepts the paragraphs to be empty from spans but since the spans are keept intact it will fail. But that's just a guess haven't fiddled with your code yet.
Glad that you like it. I found a comma in my code that caused an error - I will post a revised patch shortly.
Speaking of the middot/list conversion, with a fairly trivial two level indented unordered list copied from Word 2007 I get a different result when I do a Ctrl-v vs using the pasteword window. This is happening on the full featured example page on the TinyMCE site.
Here is the correct result (produced using pasteword - the indentation is mine):
<p>A list:</p>
<ul>
<li>Item 1
<ul>
<li>Item 1.1</li>
</ul>
</li>
<li>Item 2</li>
</ul>
and here is the incorrect result (produced using Ctrl-v - indentation is mine):
<p>A list:</p>
<ul>
<li>Item 1
<ul>
<li>Item 1.1</li>
<li>Item 2</li>
</ul>
</li>
</ul>
Creating the Word file is trivial - use the first example above as your guide. To reproduce the problem you also need to copy the paragraph that precedes the list.
Also, could the body element of the iframe used for the pasteword window have class="mceContentBody" applied to it? My pasteword window is picking up a body style that has text-align:center rather than a body.mceContentBody rule that has text-align:left - here is the patch (I know this is not the place):
Index: jscripts/tiny_mce/plugins/paste/js/pasteword.js
===================================================================
--- jscripts/tiny_mce/plugins/paste/js/pasteword.js (revision 1111)
+++ jscripts/tiny_mce/plugins/paste/js/pasteword.js (working copy)
@@ -18,7 +18,7 @@
// Write content into iframe
doc.open();
- doc.write('<html><head>' + cssHTML + '</head><body spellcheck="false"></body></html>');
+ doc.write('<html><head>' + cssHTML + '</head><body class="mceContentBody" spellcheck="false"></body></html>');
doc.close();
doc.designMode = 'on';
Now back to some other things for me.
Scott
(a.k.a. monkeybrain)