add new structure (without content)
This commit is contained in:
@@ -1,5 +1,10 @@
|
||||
# Commands
|
||||
|
||||
- menus
|
||||
- buttons
|
||||
- commands
|
||||
|
||||
|
||||
## .clearContent()
|
||||
|
||||
Clear the whole document.
|
||||
|
||||
@@ -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?
|
||||
Reference in New Issue
Block a user