docs: remove most of the tables from the content (to improve the searchability)

This commit is contained in:
Hans Pagel
2021-10-07 21:02:30 +02:00
parent 9ed883edd4
commit c5f025909e
8 changed files with 183 additions and 104 deletions

View File

@@ -99,16 +99,29 @@ The `NodeViewWrapper` and `NodeViewContent` components render a `<div>` HTML tag
## All available props
Here is the full list of what props you can expect:
| Prop | Description |
| ------------------ | --------------------------------------------------------------- |
| `editor` | The editor instance |
| `node` | The current node |
| `decorations` | An array of decorations |
| `selected` | `true` when there is a `NodeSelection` at the current node view |
| `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 |
### editor
The editor instance
### node
The current node
### decorations
An array of decorations
### selected
`true` when there is a `NodeSelection` at the current node view
### 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

@@ -119,7 +119,33 @@ Keep in mind that this content is rendered by tiptap. That means you need to tel
The `NodeViewWrapper` and `NodeViewContent` components render a `<div>` HTML tag (`<span>` for inline nodes), but you can change that. For example `<node-view-content as="p">` should render a paragraph. One limitation though: That tag must not change during runtime.
## All available props
For advanced use cases, we pass a few more props to the component. Here is the full list of what props you can expect:
For advanced use cases, we pass a few more props to the component.
### editor
The editor instance.
### node
Access the current node.
### decorations
An array of decorations.
### selected
`true` when there is a `NodeSelection` at the current node view.
### 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.
Here is the full list of what props you can expect:
```html
<template>
@@ -179,7 +205,7 @@ export default {
</script>
```
If you just want to have all (and to have TypeScript support) you can import all props like that:
If you just want to have all (and TypeScript support) you can import all props like that:
```js
// Vue 3