add new structure (without content)

This commit is contained in:
Hans Pagel
2020-08-11 16:31:03 +02:00
parent b7d8fbb2ca
commit 9d22298570
4 changed files with 76 additions and 16 deletions

View File

@@ -12,6 +12,8 @@ yarn add @tiptap/core @tiptap/starter-kit
You can use it like this:
## Vanilla JavaScript
```js
import { Editor } from '@tiptap/core'
import extensions from '@tiptap/starter-kit'
@@ -21,4 +23,38 @@ new Editor({
extensions: extensions(),
content: '<p>Hey there.</p>',
})
```
```
→ codesandbox
## Vue.js
```js
import { Editor } from '@tiptap/core'
import extensions from '@tiptap/starter-kit'
new Editor({
element: document.getElementsByClassName('element'),
extensions: extensions(),
content: '<p>Hey there.</p>',
})
```
→ codesandbox
## react
```js
import { Editor } from '@tiptap/core'
import extensions from '@tiptap/starter-kit'
new Editor({
element: document.getElementsByClassName('element'),
extensions: extensions(),
content: '<p>Hey there.</p>',
})
```
→ codesandbox
## cdn?