update: copy

This commit is contained in:
yanmao 2022-01-12 14:04:09 +08:00
parent c8ee3ea6b7
commit f3d4a7cb5b
1 changed files with 7 additions and 5 deletions

View File

@ -225,11 +225,13 @@ export default class Clipboard implements ClipboardInterface {
}
}
}
const contents = range.cloneContents();
if (customizeStartItem) {
contents.removeChild(contents.childNodes[0]);
contents.prepend(customizeStartItem[0]);
}
const contents = range
.enlargeToElementNode(true)
.cloneContents();
// if (customizeStartItem) {
// contents.removeChild(contents.childNodes[0]);
// contents.prepend(customizeStartItem[0]);
// }
const listMergeBlocks: NodeInterface[] = [];
contents.querySelectorAll('li').forEach((child) => {
const childElement = $(child);