slab / quill

Quill is a modern WYSIWYG editor built for compatibility and extensibility
https://quilljs.com
BSD 3-Clause "New" or "Revised" License
43.67k stars 3.39k forks source link

Copy/Cut embed when multiple embeds in row copies/cuts more then selected #1761

Closed DmitrySkripkin closed 6 months ago

DmitrySkripkin commented 7 years ago

gif

Steps for Reproduction

  1. Visit CodePen
  2. Select and copy first formula
  3. Paste anywhere (even not quill)

Expected behavior: Selected formula pasted

Actual behavior: Selected formula + extra content pasted

Platforms: Linux, MacOS - latest Chrome

Version: 1.3.3

P.S. You can select formula and run this code:

var selection = window.getSelection();
var  range = selection.getRangeAt(0);
range.cloneContents();

Only one embed is cloned. How does quill handle copy/paste? Can't find anything that can help me to solve this issue.

P.P.S. quill.getContents() returns only one embed too.

rywall commented 7 years ago

Cutting/Pasting an embed also seems to throw away the embed formatting, leaving only the inner text. You can replicate this on the quilljs.com homepage by cutting/pasting the formula at the bottom.

image

quill-bot commented 6 months ago

Quill 2.0 has been released (announcement post) with many changes and fixes. If this is still an issue please create a new issue after reviewing our updated Contributing guide :pray: