docs: write about drag handles for node views, fix #1234
This commit is contained in:
@@ -102,11 +102,6 @@ parseHTML() {
|
|||||||
### Render JavaScript/Vue/React
|
### 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 you’re using an editor to render the content. :-)
|
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 you’re 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
|
<!-- ## Reference
|
||||||
|
|
||||||
### dom: ?dom.Node
|
### dom: ?dom.Node
|
||||||
|
|||||||
@@ -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 |
|
| `extension` | Access to the node extension, for example to get options |
|
||||||
| `getPos` | Get the document position of the current node |
|
| `getPos` | Get the document position of the current node |
|
||||||
| `updateAttributes` | Update attributes 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" /> -->
|
||||||
|
|||||||
@@ -189,3 +189,8 @@ export default Vue.extend({
|
|||||||
props: nodeViewProps,
|
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" />
|
||||||
|
|||||||
Reference in New Issue
Block a user