feat: add deleteNode method to node views

This commit is contained in:
Philipp Kühn
2021-05-19 00:01:49 +02:00
parent 0f299d228e
commit fcee5f82c6
7 changed files with 24 additions and 0 deletions

View File

@@ -106,6 +106,7 @@ Here is the full list of what props you can expect:
| `extension` | Access to the node extension, for example to get options |
| `getPos` | Get the document position of the current node |
| `updateAttributes` | Update attributes of the current node |
| `deleteNode` | Delete the current node |
## Dragging
To make your node views draggable, set `draggable: true` in the extension and add `data-drag-handle` to the DOM element that should function as the drag handle.

View File

@@ -167,6 +167,11 @@ export default {
updateAttributes: {
type: Function,
},
// delete the current node
deleteNode: {
type: Function,
},
},
}
</script>