docs: update content

This commit is contained in:
Hans Pagel
2021-04-06 23:36:07 +02:00
parent cc21f8bb70
commit 3f3ce1d8d4
17 changed files with 62 additions and 33 deletions

View File

@@ -1,4 +1,4 @@
# Configure the editor
# Configuration
## toc

View File

@@ -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, dont forget to [share it with the community](https://github.com/ueberdosis/tiptap/issues/819).

View File

@@ -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 isnt 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:

View File

@@ -49,7 +49,7 @@ Lets assume youve got the editor running already and you want to add your
Oh, thats a long command, right? Actually, its a [chain of commands](/api/commands#chain-commands), so lets go through this one by one:
```js
editor.chain().toggleBold().focus().run()
editor.chain().focus().toggleBold().run()
```
1. `editor` should be a tiptap instance,

View File

@@ -61,7 +61,7 @@ You can even mix non-editable and editable text. Thats great to build complex
**BUT**, that also means the cursor cant 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 youre working with HTML, youll need to tell tiptap how your node should be serialized.
But what happens if you [access the editor content](/guide/output)? If youre working with HTML, youll 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 wouldnt want that anyway.

View File

@@ -8,7 +8,7 @@ Using frameworks like Vue or React can feel too complex, if youre 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)

View File

@@ -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()`

View File

@@ -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()`

View File

@@ -1,4 +1,4 @@
# Export content
# Output
## toc

View File

@@ -1,4 +1,4 @@
# Custom styling
# Styling
## toc