Forum closed. New forum available at http://community.wymeditor.org/

Word formatting removal?

Discuss features, code, contributions, ideas, suggestions, ...
For bugs, patches and feature requests, please post on the Trac:
http://trac.wymeditor.org/

Word formatting removal?

Postby aerinmin on Tue Dec 12, 2006 8:42 pm

One of the biggest annoyances I've had with text editors is the processing of Microsoft Word formatting. When a user cuts and pastes from word, all sorts of span tags with inline styles also come in. This happened in WYMeditor too. The resulting code:


<p class="MsoNormal"><strong style=""><span style="font-size: 10pt; font-family: Arial;">35. Promotions: &amp; Opportunites
(use image jross_495)<o:p></o:p></span></strong><br /><span style="font-size: 10pt; font-family: Arial;">36. Shop
til you Drop<o:p></o:p><br />37. Dance
Fever<o:p></o:p><br />38. Under
Wraps<o:p></o:p><br />39. Pucci
Power<o:p></o:p><br />40. Full
Forward<o:p></o:p><br />41. Romper
Room<o:p></o:p></span></p>
aerinmin
 
Posts: 1
Joined: Tue Dec 12, 2006 8:32 pm

Re: Word formatting removal?

Postby jfh on Tue Dec 12, 2006 10:30 pm

aerinmin wrote:One of the biggest annoyances I've had with text editors is the processing of Microsoft Word formatting. When a user cuts and pastes from word, all sorts of span tags with inline styles also come in. This happened in WYMeditor too. The resulting code:


<p class="MsoNormal"><strong style=""><span style="font-size: 10pt; font-family: Arial;">35. Promotions: &amp; Opportunites
(use image jross_495)<o:p></o:p></span></strong><br /><span style="font-size: 10pt; font-family: Arial;">36. Shop
til you Drop<o:p></o:p><br />37. Dance
Fever<o:p></o:p><br />38. Under
Wraps<o:p></o:p><br />39. Pucci
Power<o:p></o:p><br />40. Full
Forward<o:p></o:p><br />41. Romper
Room<o:p></o:p></span></p>


Strange... Pasting from Word is nevertheless managed: under IE, WYMeditor takes the raw text and inserts clean paragraphs (see 'Copy-Paste clean up' info at the bottom-right) - under Firefox, you've to use the button 'Paste from Word' (top menu).
What browser do you use?
User avatar
jfh
Site Admin
 
Posts: 370
Joined: Sat Sep 23, 2006 8:43 pm
Location: Belgium

Postby cdanea on Fri Feb 23, 2007 10:30 am

I have the same issue.
Using FF I get the crappy MSO code on copy/paste inside the editor area. Offcourse the "Paste from Word" utility isn't recommended when pasting tables for example.

On the other hand, when using IE the code has no MSO-classes, no more spans like in FF, but the tables and even simpler (italics, bolds...) formating is obliterated. Only P's survive.

I'd like a hybrid of the 2... get rid of the class="MSOsomething" and the spans, but keep the tables, the lists and all that...


Thanks for the great work guys. I love your it and I'll try to send you my mods and quirks.
cdanea
 
Posts: 6
Joined: Fri Feb 23, 2007 10:21 am


Return to Developers

Who is online

Users browsing this forum: No registered users and 2 guests