(nodes)
| 75 | return nodes?.length === 1; |
| 76 | }, |
| 77 | action(nodes) { |
| 78 | const node = nodes?.[0]; |
| 79 | if (!node) { |
| 80 | return; |
| 81 | } |
| 82 | const { document: doc, parent, index } = node; |
| 83 | const data = getNodesSchema(nodes); |
| 84 | clipboard.setData(data); |
| 85 | |
| 86 | if (parent) { |
| 87 | const newNode = doc?.insertNode(parent, node, (index ?? 0) + 1, true); |
| 88 | newNode?.select(); |
| 89 | } |
| 90 | }, |
| 91 | }); |
| 92 | |
| 93 | material.addContextMenuOption({ |
nothing calls this directly
no test coverage detected
searching dependent graphs…