feat: duplicate

This commit is contained in:
弱冠 2020-05-07 21:16:58 +08:00
parent 27cd9165f1
commit ec932aa774

View File

@ -352,6 +352,8 @@ const builtinComponentActions: ComponentAction[] = [
title: intlNode('copy'), title: intlNode('copy'),
action(node: Node) { action(node: Node) {
// node.remove(); // node.remove();
const { document: doc, parent, schema, index } = node;
parent && doc.insertNode(parent, schema, index);
}, },
}, },
important: true, important: true,