move all extensions to separate pages

This commit is contained in:
Hans Pagel
2020-08-18 21:39:41 +02:00
parent c7d2389d2e
commit c182842681
24 changed files with 940 additions and 909 deletions

View File

@@ -0,0 +1,58 @@
# Blockquote
Allows you to use the `<blockquote>` HTML tag in the editor.
#### Options
*None*
#### Commands
| command | options | description |
| ------ | ---- | ---------------- |
| blockquote | none | Wrap content in a blockquote. |
#### Keybindings
* `Control` + `→`
#### Example
```markup
<template>
<div>
<editor-menu-bar :editor="editor" v-slot="{ commands, isActive }">
<button type="button" :class="{ 'is-active': isActive.blockquote() }" @click="commands.blockquote">
Blockquote
</button>
</editor-menu-bar>
<editor-content :editor="editor" />
</div>
</template>
<script>
import { Editor, EditorContent, EditorMenuBar } from 'tiptap'
import { Blockquote } from 'tiptap-extensions'
export default {
components: {
EditorMenuBar,
EditorContent,
},
data() {
return {
editor: new Editor({
extensions: [
new Blockquote(),
],
content: `
<blockquote>
Life is like riding a bycicle. To keep your balance, you must keep moving.
</blockquote>
<p>Albert Einstein</p>
`,
}),
}
},
beforeDestroy() {
this.editor.destroy()
}
}
</script>
```