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

@ -1,5 +1,10 @@
# Commands
- menus
- buttons
- commands
## .clearContent()
Clear the whole document.

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?

View File

@ -6,6 +6,8 @@
{{ $static.metadata.siteName }}
</g-link>
<div>
Algolia Search |
Sponsor
<github-button
href="https://github.com/scrumpy/tiptap"
data-show-count="true"

View File

@ -5,29 +5,46 @@
- title: Installation
link: /installation/
- title: Core Concepts
- title: Guide
items:
- title: Renderless
link: /renderless/
- title: Schema
link: /schema/
- title: Editor
link: /editor/
- title: Extensions
link: /extensions/
- title: Commands
link: /commands/
- title: Events
link: /events/
- title: First Steps
link: /first-steps/
- title: Configuration
link: /configuration/
- title: Build your editor
link: /build-your-editor/
- title: Custom styling
link: /custom-styling/
- title: Get content
link: /get-content/
- title: "Advanced nodes"
link: /advanced-notes/
- title: Vue
items:
- title: Basic Example
link: /basic-example/
- title: Advanced Example
link: /advanced-example/
link: /advanced-vue-example/
- title: Render Vue Components
link: /render-vue-components/
- title: React
items:
- title: React
link: /react/
link: /react/
- title: Render React Components
link: /advanced-react-example/
- title: API
items:
- title: Editor
link: /editor/
- title: Extensions
link: /extensions/
- title: Commands
link: /commands/
- title: Events
link: /events/
- title: Schema
link: /schema/