Files
tiptap/docs/src/docPages/guide/custom-extensions.md
2021-04-06 23:36:07 +02:00

37 lines
856 B
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# 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.
})
```