docs: update content
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
# Configure the editor
|
||||
# Configuration
|
||||
|
||||
## toc
|
||||
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
# Build extensions
|
||||
# Custom extensions
|
||||
|
||||
## toc
|
||||
|
||||
## Introduction
|
||||
You can build your own extensions from scratch with the `Node`, `Mark`, and `Extension` classes. Just pass an object with your configuration and custom code. Read the guide on [extending the functionality](/guide/extend-extensions) to learn more about all the things you can control.
|
||||
You can build your own extensions from scratch with the `Node`, `Mark`, and `Extension` classes. Just pass an object with your configuration and custom code. Read the [ovewrite & extend](/guide/extend-extensions) guide to learn more about all the things you can control.
|
||||
|
||||
And if everything is working fine, don’t forget to [share it with the community](https://github.com/ueberdosis/tiptap/issues/819).
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# Extend the functionality
|
||||
# Overwrite & extend
|
||||
|
||||
## toc
|
||||
|
||||
@@ -37,7 +37,7 @@ The same applies to every aspect of an existing extension, except to the name. L
|
||||
### Name
|
||||
The extension name is used in a whole lot of places and changing it isn’t too easy. If you want to change the name of an existing extension, we would recommended to copy the whole extension and change the name in all occurrences.
|
||||
|
||||
The extension name is also part of the JSON. If you [store your content as JSON](/guide/content#option-1-json), you need to change the name there too.
|
||||
The extension name is also part of the JSON. If you [store your content as JSON](/guide/output#option-1-json), you need to change the name there too.
|
||||
|
||||
### Settings
|
||||
All settings can be configured through the extension anyway, but if you want to change the default settings, for example to provide a library on top of tiptap for other developers, you can do it like that:
|
||||
|
||||
@@ -49,7 +49,7 @@ Let’s assume you’ve got the editor running already and you want to add your
|
||||
Oh, that’s a long command, right? Actually, it’s a [chain of commands](/api/commands#chain-commands), so let’s go through this one by one:
|
||||
|
||||
```js
|
||||
editor.chain().toggleBold().focus().run()
|
||||
editor.chain().focus().toggleBold().run()
|
||||
```
|
||||
|
||||
1. `editor` should be a tiptap instance,
|
||||
|
||||
@@ -61,7 +61,7 @@ You can even mix non-editable and editable text. That’s great to build complex
|
||||
**BUT**, that also means the cursor can’t just move from outside of the node view to the inside. Users have to manually place their cursor to edit the content inside the node view. Just so you know.
|
||||
|
||||
## Markup
|
||||
But what happens if you [access the editor content](/guide/content)? If you’re working with HTML, you’ll need to tell tiptap how your node should be serialized.
|
||||
But what happens if you [access the editor content](/guide/output)? If you’re working with HTML, you’ll need to tell tiptap how your node should be serialized.
|
||||
|
||||
The editor **does not** export the rendered JavaScript node, and for a lot of use cases you wouldn’t want that anyway.
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@ Using frameworks like Vue or React can feel too complex, if you’re used to wor
|
||||
## Render a node view with JavaScript
|
||||
Here is what you need to do to render a node view inside your editor:
|
||||
|
||||
1. [Create a node extension](/guide/build-extensions)
|
||||
1. [Create a node extension](/guide/custom-extensions)
|
||||
2. Register a new node view with `addNodeView()`
|
||||
3. Write your render function
|
||||
4. [Configure tiptap to use your new node extension](/guide/configuration)
|
||||
|
||||
@@ -8,7 +8,7 @@ Using plain JavaScript can feel complex if you are used to work in React. Good n
|
||||
## Render a React component
|
||||
Here is what you need to do to render React components inside your editor:
|
||||
|
||||
1. [Create a node extension](/guide/build-extensions)
|
||||
1. [Create a node extension](/guide/custom-extensions)
|
||||
2. Create a React component
|
||||
3. Pass that component to the provided `ReactNodeViewRenderer`
|
||||
4. Register it with `addNodeView()`
|
||||
|
||||
@@ -8,7 +8,7 @@ Using plain JavaScript can feel complex if you are used to work in Vue. Good new
|
||||
## Render a Vue component
|
||||
Here is what you need to do to render Vue components inside your editor:
|
||||
|
||||
1. [Create a node extension](/guide/build-extensions)
|
||||
1. [Create a node extension](/guide/custom-extensions)
|
||||
2. Create a Vue component
|
||||
3. Pass that component to the provided `VueNodeViewRenderer`
|
||||
4. Register it with `addNodeView()`
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# Export content
|
||||
# Output
|
||||
|
||||
## toc
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# Custom styling
|
||||
# Styling
|
||||
|
||||
## toc
|
||||
|
||||
|
||||
Reference in New Issue
Block a user