update docs

This commit is contained in:
Philipp Kühn
2020-11-16 10:03:12 +01:00
parent c87f49c1fe
commit dac2434cd3
6 changed files with 69 additions and 69 deletions

View File

@@ -29,9 +29,9 @@ import Text from '@tiptap/extension-text'
new Editor({
extensions: [
Document(),
Paragraph(),
Text(),
Document,
Paragraph,
Text,
// all your other extensions
]
})
@@ -44,9 +44,9 @@ new Editor({
In case youve built some custom extensions for your project, youre required to rewrite them to fit the new API. No worries, you can keep a lot of your work though. The `schema`, `commands`, `keys`, `inputRules` and `pasteRules` all work like they did before. Its just different how you register them.
```js
import { createNode } from '@tiptap/core'
import { NodeExtension } from '@tiptap/core'
const CustomExtension = createNode({
const CustomExtension = NodeExtension.create({
name: 'custom_extension'
defaultOptions: {
@@ -57,7 +57,7 @@ const CustomExtension = createNode({
parseHTML() {
},
renderHTML({ node, attributes }) {
renderHTML({ node, HTMLAttributes }) {
},
addCommands() {