docs: write about drag handles for node views, fix #1234

This commit is contained in:
Hans Pagel
2021-05-05 20:58:16 +02:00
parent ef98d070ac
commit 6f0fa6569d
3 changed files with 10 additions and 5 deletions

View File

@@ -102,11 +102,6 @@ parseHTML() {
### Render JavaScript/Vue/React
But what if you want to render your actual JavaScript/Vue/React code? Consider using tiptap to render your output. Just set the editor to `editable: false` and no one will notice youre using an editor to render the content. :-)
## 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.
<demo name="Guide/NodeViews/DragHandle" />
<!-- ## Reference
### dom: ?dom.Node

View File

@@ -106,3 +106,8 @@ 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 |
## 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.
<!-- <demo name="Guide/NodeViews/DragHandle" /> -->

View File

@@ -189,3 +189,8 @@ export default Vue.extend({
props: nodeViewProps,
})
```
## 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.
<demo name="Guide/NodeViews/DragHandle" />