quill icon indicating copy to clipboard operation
quill copied to clipboard

Not able to copy and paste embed blocks content.

Open keval6706 opened this issue 1 year ago • 2 comments

Steps for Reproduction

  1. Visit codesandbox.io
  2. Add a mention by clicking the Add Mention button.
  3. Now, try copying the editor content using Ctrl+C or Cmd+C,
  4. and paste it into Notes or somewhere else.

Expected behavior: I should be able to copy and paste embed blocks content.

Actual behavior: I am able to paste other content, but not embed blots.

Platforms: All Platforms

Version:

Run 2.0.0-rc.4 to find out

Copy and Paste embed blocks content is working for version: 1.3.7 but not for 2.0.0-rc.4, 2.0.0-rc.5 Also, if anyone have a better solution for rendering mention or hashtag blocks, that would be a great help. Thanks in advance :)

keval6706 avatar Apr 04 '24 13:04 keval6706

The mention blot should set up static value() correctly. Currently it returns a HTMLElement. The returned value will be used in Quill#getContents(). You would also need to override Quill#getText() to include the text from the mention embed.

luin avatar Apr 09 '24 14:04 luin

Hey @luin

Thanks for the reply. Using Quill is still a learning stage for me. Could you please provide an integration guide or a small demo? That would be a great help. Thanks in advance :)

keval6706 avatar Apr 10 '24 05:04 keval6706