Ticket #2775 (closed Task: fixed)

Opened 4 years ago

Last modified 4 years ago

Implement Paste from Word dialog

Reported by: garry.yao Owned by: martinkou
Priority: Normal Milestone: CKEditor 3.0
Component: Core : Output Data Version: SVN (FCKeditor) - Retired
Keywords: Confirmed Review+ Cc:

Description (last modified by martinkou) (diff)

This bug cause comments tag content being inserted as codes when switch to 'source' mode after pasting MS-WORD(2003) documents which always contents IE-targeted conditional comments.

  1. Open an editor instance with 'source' mode and paste the content of attachment 'msword-comments-doc' into 'wysiwyg' mode.
  2. Switch to 'source' mode
    • Expected: 'source' mode contains correct content markups.
    • Actual: 'source' mode contains comment tag inner content.

Edit (2009-01-16): This is actually a missing feature.

Attachments

msword-comments-doc.doc (26.5 KB) - added by garry.yao 4 years ago.
reproducing attachment
2775.patch (12.5 KB) - added by martinkou 4 years ago.
2775_2.patch (13.1 KB) - added by martinkou 4 years ago.
2775_3.patch (12.7 KB) - added by martinkou 4 years ago.

Change History

Changed 4 years ago by garry.yao

reproducing attachment

comment:1 Changed 4 years ago by martinkou

  • Component changed from General to Core : Output Data

comment:2 Changed 4 years ago by martinkou

  • Summary changed from plugin:htmlparser didn't exclude comments tags from input streams to core:htmlparser didn't exclude comments tags from input streams

comment:3 Changed 4 years ago by martinkou

  • Type changed from Bug to Task
  • Description modified (diff)
  • Summary changed from core:htmlparser didn't exclude comments tags from input streams to Implement Paste from Word dialog

Do you mean these things left in the beginning of the HTML output?

Normal 0  0 2  false false false               MicrosoftInternetExplorer4         /* Style Definitions */ table.MsoNormalTable {mso-style-name:"Table Normal"; 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;}

These are actually fragments of <style> and <meta> contents pasted from MS Word. We have a "Paste from Word" dialog in v2 for cleaning up these things, but it isn't ported to v3, yet. So it's not a bug, but rather a missing feature.

comment:4 Changed 4 years ago by arczi

  • Keywords Confirmed added

comment:5 Changed 4 years ago by martinkou

  • Owner set to martinkou
  • Status changed from new to assigned

Changed 4 years ago by martinkou

comment:6 Changed 4 years ago by martinkou

  • Keywords Review? added

comment:7 Changed 4 years ago by fredck

  • Keywords Review- added; Review? removed
  • The cleanWord function must be a property of the dialog definition. In this way it's possible to easily replace it.
  • The htmlToLoad string must also go into the dialog definition. It doesn't need to blow the core.
  • Again... do not overuse CKEDITOR.tools.extend. The settings can be defined each one separately, like CKEDITOR.config.pasteFromWordIgnoreFontFace.

Changed 4 years ago by martinkou

comment:8 Changed 4 years ago by martinkou

  • Keywords Review? added; Review- removed

comment:9 Changed 4 years ago by fredck

  • Keywords Review- added; Review? removed

I didn't look at this patch in depth, but in the Trac preview, I can note we have an unneeded (function(){})(); holding the _source/plugins/pastefromword/dialogs/pastefromword.js code.

Changed 4 years ago by martinkou

comment:10 Changed 4 years ago by martinkou

  • Keywords Review? added; Review- removed

Ah, yes, I forgot to remove the outer closure after removing the local variables.

comment:11 Changed 4 years ago by fredck

  • Keywords Review+ added; Review? removed

comment:12 Changed 4 years ago by martinkou

  • Status changed from assigned to closed
  • Resolution set to fixed

Fixed with [3083].

Note: See TracTickets for help on using tickets.
© 2003 – 2012 CKSource – Frederico Knabben. All rights reserved. | Terms of use | Privacy policy