diff --git a/docs/src/docPages/guide/node-views.md b/docs/src/docPages/guide/node-views.md index b1843a6a..0b599f54 100644 --- a/docs/src/docPages/guide/node-views.md +++ b/docs/src/docPages/guide/node-views.md @@ -5,7 +5,46 @@ ## Introduction 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 with Vue.js -Using Vanilla JavaScript can feel complex, if you are used to work in Vue. Good news: You can even use regular Vue components in your node views. There is just a little bit you need to know, before starting. +## Node views with Vue +Using Vanilla JavaScript can feel complex, if you are used to work in Vue. Good news: You can even use regular Vue components in your node views. There is just a little bit you need to know, but let’s go through this one by one. ### Render a Vue component -Let’s start rendering your first Vue component. Here is what you need to do: +Here is what you need to do to render Vue components inside your text editor: -1. [Create a new node](/guide/build-extensions) -2. Create a new Vue component +1. [Create a node extension](/guide/build-extensions) +2. Create a Vue component 3. Pass that component to the provided `VueNodeViewRenderer` 4. Register it with `addNodeView()` 5. [Configure tiptap to use your new node](/guide/configuration) @@ -153,27 +140,29 @@ this.updateAttributes({ ### Adding a content editable +```html + + + ``` -### Component with Content +## Node views with React +TODO -```html - +## Rendered content -