Opened 4 months ago

Closed 3 months ago

#16876 closed New Feature (fixed)

Pasting via dialog should provide accessible dataTransfer

Reported by: t.jakut Owned by: t.jakut
Priority: Nice to have (we want to work on it) Milestone:
Component: General Version:
Keywords: Cc:


Currently pasting rich text into dialog could strip all additional information (e.g. styling) and pass only plain text into the editor. It's especially visible when pasting from Word:

  1. Open attached Word document.
  2. Select part of the sentence (e.g. first two words).
  3. Click "Paste" button to open paste dialog.
  4. Paste into dialog.

The text pasted into dialog is converted into plain text and in this form is then pasted into the editor.

There should be a way to get the original, raw pasted data from dialog, preferably from native dataTransfer. However, due to limitations of clipboard API, it can be fetched only synchronously. Probably the best way to get it from editor's dialog is to create new event, which will be fired after pasting into dialog.

The way to obtain raw data should be universal, as in the future editor may need to get some other data type, not only text/html. In this case creating a snapshot of native dataTransfer and passing it to the event should be a sufficient solution.

Attachments (1)

custom_styles.docx (12.5 KB) - added by t.jakut 4 months ago.

Download all attachments as: .zip

Change History (4)

Changed 4 months ago by t.jakut

comment:1 Changed 4 months ago by t.jakut

  • Owner set to t.jakut
  • Status changed from new to assigned

comment:2 Changed 4 months ago by m.lewandowski

  • Summary changed from Pasting via dialog should expose raw pasted data to Pasting via dialog should provide accessible dataTransfer

comment:3 Changed 3 months ago by m.lewandowski

  • Milestone CKEditor 4.7.0 deleted
  • Resolution set to fixed
  • Status changed from assigned to closed
  • Version 4.7.0 (GitHub - major) deleted

Fixed by #16954.

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