docs: update content
This commit is contained in:
@@ -7,7 +7,7 @@ export default Node.create({
|
|||||||
|
|
||||||
group: 'block',
|
group: 'block',
|
||||||
|
|
||||||
content: 'block+',
|
content: 'inline*',
|
||||||
|
|
||||||
addAttributes() {
|
addAttributes() {
|
||||||
return {
|
return {
|
||||||
|
|||||||
@@ -6,6 +6,7 @@
|
|||||||
Node views are the best thing since sliced bread, at least if you are a fan of customization (and bread). With node views you can add interactive nodes to your editor content. That can literally be everything. If you can write it in JavaScript, you can use it in your editor.
|
Node views are the best thing since sliced bread, at least if you are a fan of customization (and bread). With node views you can add interactive nodes to your editor content. That can literally be everything. If you can write it in JavaScript, you can use it in your editor.
|
||||||
|
|
||||||
## Different types of node views
|
## Different types of node views
|
||||||
|
TODO
|
||||||
|
|
||||||
### Editable content
|
### Editable content
|
||||||
```html
|
```html
|
||||||
@@ -54,7 +55,7 @@ export default Node.create({
|
|||||||
return ({ editor, node, getPos, HTMLAttributes, decorations, extension }) => {
|
return ({ editor, node, getPos, HTMLAttributes, decorations, extension }) => {
|
||||||
const dom = document.createElement('div')
|
const dom = document.createElement('div')
|
||||||
|
|
||||||
dom.innerHTML = 'I’m a node view'
|
dom.innerHTML = 'Hello, I’m a node view!'
|
||||||
|
|
||||||
return {
|
return {
|
||||||
dom,
|
dom,
|
||||||
@@ -230,14 +231,14 @@ renderHTML({ HTMLAttributes }) {
|
|||||||
## Examples
|
## Examples
|
||||||
TODO
|
TODO
|
||||||
|
|
||||||
### Drag handles
|
<!-- ### Drag handles
|
||||||
<demo name="Guide/NodeViews/DragHandle" />
|
<demo name="Guide/NodeViews/DragHandle" />
|
||||||
|
|
||||||
### Table of contents
|
### Table of contents
|
||||||
<demo name="Guide/NodeViews/TableOfContents" />
|
<demo name="Guide/NodeViews/TableOfContents" />
|
||||||
|
|
||||||
### Drawing in the editor
|
### Drawing in the editor
|
||||||
<demo name="Examples/Drawing" />
|
<demo name="Examples/Drawing" /> -->
|
||||||
|
|
||||||
## Reference
|
## Reference
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user