Hi all.
I use the last component 1.5.5.4 for Joomla 1.5 (i think with code of ckeditor 3.5.2 ).
I only can paste from Microsoft Word (2003 SP3) with options "pasteFromWordRemoveStyles" and "pasteFromWordRemoveFontStyles" both enable or both disable.
Viceversa (only one enable) i get an error message 'It was not possible to clean up the pasted data due to an internal error' and the text is pasted directed (all dirty code html from Word).
With both options disable: the text imported is too "dirty".
With both options enable (DEFAULT in CKEditor): the text imported is too "clean" ... the attribute "font-variant: small-caps;" is removed !!!
* At bottom an example of my text imported.
I would have in my text only:
- style character (bold, italic, small-caps, underline, etc...)
- style name of paragraph, that is the attribute class like MsoNormal, MsoFootnoteText, MsoFootnoteReference, MyPersonalStyleForSummary, etc... (the name of styles used in Word)
Well, i need of help.
-
[URGENT] How to get clean html with preserve of small-caps (most important for me) and style name (less important) ?
-
Can i create a "mapping" from style name imported (p.MsoNormal, h1.MsoNormal, h2.title2 ...) and my personal style in the web/ckeditor ?
Many thanks,
Marco
P.S.
This is an example of the same text imported in Google Chrome 9.0.597.107 and Mozilla Firefox 3.6.15
Chrome:<html dir="ltr" lang="it"> <head> <style>body { margin: 3px; height: 95%; } </style> </head> <body> <span style="font-size:11.0pt;font-family:"Times New Roman"; mso-fareast-font-family:"Times New Roman";mso-ansi-language:IT;mso-fareast-language: IT;mso-bidi-language:AR-SA">questa parte, l’attività sciistica ha acquisito, al cospetto dell’ordinamento giuridico, crescente importanza e dignità, sino a costituire oggetto di un apposito provvedimento legislativo, rappresentato dalla legge <st1:date year="2003" day="24" month="12" ls="trans" w:st="on">24 dicembre 2003</st1:date>, n. 363, recante <i>Norme in materia di sicurezza nella pratica degli </i></span> </body> </html>
Mozilla:<html lang="it" dir="ltr"><head><style>body { margin: 3px; height: 95%; } </style></head><body><!--[if gte mso 9]><xml> <w:WordDocument> <w:View>Normal</w:View> <w:Zoom>0</w:Zoom> <w:HyphenationZone>14</w:HyphenationZone> <w:PunctuationKerning/> <w:ValidateAgainstSchemas/> <w:SaveIfXMLInvalid>false</w:SaveIfXMLInvalid> <w:IgnoreMixedContent>false</w:IgnoreMixedContent> <w:AlwaysShowPlaceholderText>false</w:AlwaysShowPlaceholderText> <w:Compatibility> <w:BreakWrappedTables/> <w:SnapToGridInCell/> <w:WrapTextWithPunct/> <w:UseAsianBreakRules/> <w:DontGrowAutofit/> </w:Compatibility> <w:BrowserLevel>MicrosoftInternetExplorer4</w:BrowserLevel> </w:WordDocument> </xml><![endif]--><!--[if gte mso 9]><xml> <w:LatentStyles DefLockedState="false" LatentStyleCount="156"> </w:LatentStyles> </xml><![endif]--><!--[if !mso]><object classid="clsid:38481807-CA0E-42D2-BF39-B33AF135CC4D" id=ieooui></object> <style> st1\:*{behavior:url(#ieooui) } </style> <![endif]--><!--[if gte mso 10]> <style> /* Style Definitions */ table.MsoNormalTable {mso-style-name:"Tabella normale"; mso-tstyle-rowband-size:0; mso-tstyle-colband-size:0; mso-style-noshow:yes; mso-style-parent:""; mso-padding-alt:0cm 5.4pt 0cm 5.4pt; mso-para-margin:0cm; mso-para-margin-bottom:.0001pt; mso-pagination:widow-orphan; font-size:10.0pt; font-family:"Times New Roman"; mso-ansi-language:#0400; mso-fareast-language:#0400; mso-bidi-language:#0400;} </style> <![endif]--><span style="font-size: 11pt; font-family: "Times New Roman";" _moz_dirty="">questa parte, l’attività sciistica ha acquisito, al cospetto dell’ordinamento giuridico, crescente importanza e dignità, sino a costituire oggetto di un apposito provvedimento legislativo, rappresentato dalla legge 24 dicembre 2003, n. 363, recante <i>Norme in materia di sicurezza nella pratica degli </i></span></body></html>
Re: Bug in pasteFromWord with CKEditor for Joomla ?
Hi,
have you tested your Word text in http://ckeditor.com/demo ?
Can you check if there are results as you expect ?
Please give me this info it will be very helpful.
Re: Bug in pasteFromWord with CKEditor for Joomla ?
Sorry mkesicki, I have been very busy.
I tried on http://ckeditor.com/demo and I got the same error.
In the demo i cannot set the copy options and I did not get any alert message box, but the imported text is too clean and without the "small-caps".
Every html element is without class attribute (style name of word) and font-variant is removed.
I hope this helps.
Many thanks,
Marco
Re: Bug in pasteFromWord with CKEditor for Joomla ?
Hi,
yes this is really helpful information. AS you see this issue is not related with extension for Joomla, but with editor itself.
EDIT:
For you special needs please look at http://docs.cksource.com/ckeditor_api/symbols/CKEDITOR.config.html#.pasteFromWordCleanupFile. Than you can write your own function to clean up text from word. With this way you can customize CKEditor for your needs.
Hope this helps you.