feat: add deleteNode method to node views
This commit is contained in:
@@ -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.
|
||||
|
||||
@@ -167,6 +167,11 @@ export default {
|
||||
updateAttributes: {
|
||||
type: Function,
|
||||
},
|
||||
|
||||
// delete the current node
|
||||
deleteNode: {
|
||||
type: Function,
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user