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

@@ -0,0 +1,36 @@
# 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 [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).
### Create a node
```js
import { Node } from '@tiptap/core'
const CustomNode = Node.create({
// Your code goes here.
})
```
### Create a mark
```js
import { Mark } from '@tiptap/core'
const CustomMark = Mark.create({
// Your code goes here.
})
```
### Create an extension
```js
import { Extension } from '@tiptap/core'
const CustomExtension = Extension.create({
// Your code goes here.
})
```