docs: update content

This commit is contained in:
Hans Pagel
2021-05-04 23:59:34 +02:00
parent 0c06ece8e9
commit 19f61fda1a
12 changed files with 559 additions and 516 deletions

View File

@@ -87,7 +87,7 @@ Make sure its something distinguishable, so its easier to restore the cont
### Parse HTML
The same applies to restoring the content. You can configure what markup you expect, that can be something completely unrelated to the node view markup. It just needs to contain all the information you want to restore.
Attributes are automagically restored, if you registered them through [`addAttributes`](/guide/extend-extensions#attributes).
Attributes are automagically restored, if you registered them through [`addAttributes`](/guide/custom-extensions#attributes).
```js
// Input: <my-custom-node count="1"></my-custom-node>
@@ -102,6 +102,11 @@ 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