Opened 7 years ago

Closed 7 years ago

#16876 closed New Feature (fixed)

Pasting via dialog should provide accessible dataTransfer

Reported by: Tomasz Jakut Owned by: Tomasz 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 Tomasz Jakut 7 years ago.

Download all attachments as: .zip

Change History (4)

Changed 7 years ago by Tomasz Jakut

Attachment: custom_styles.docx added

comment:1 Changed 7 years ago by Tomasz Jakut

Owner: set to Tomasz Jakut
Status: newassigned

comment:2 Changed 7 years ago by Marek Lewandowski

Summary: Pasting via dialog should expose raw pasted dataPasting via dialog should provide accessible dataTransfer

comment:3 Changed 7 years ago by Marek Lewandowski

Milestone: CKEditor 4.7.0
Resolution: fixed
Status: assignedclosed
Version: 4.7.0 (GitHub - major)

Fixed by #16954.

Note: See TracTickets for help on using tickets.
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy