clean up the horizontal rule page

This commit is contained in:
Hans Pagel
2020-09-10 14:40:49 +02:00
parent 6f898a004b
commit e1d9ecaf91
2 changed files with 1 additions and 46 deletions

View File

@@ -1,7 +1,7 @@
# HorizontalRule # HorizontalRule
Use this extension to render a `<hr>` HTML tag. If you pass `<hr>` in the editors initial content, itll be rendered accordingly. Use this extension to render a `<hr>` HTML tag. If you pass `<hr>` in the editors initial content, itll be rendered accordingly.
Type `---` (three dashes) or `___ ` (three underscores and a space) at the beginning of a new line and it will be magically transformed to a horizontal rule. Type three dashes (`---`) or three underscores and a space (`___ `) at the beginning of a new line and it will be magically transformed to a horizontal rule.
## Options ## Options
| Option | Type | Default | Description | | Option | Type | Default | Description |
@@ -21,47 +21,3 @@ Type `---` (three dashes) or `___ ` (three underscores and a space) at the begin
## Usage ## Usage
<demo name="Extensions/HorizontalRule" highlight="3-5,17,36" /> <demo name="Extensions/HorizontalRule" highlight="3-5,17,36" />
## Usage
```markup
<template>
<div>
<editor-menu-bar :editor="editor" v-slot="{ commands, isActive }">
<button type="button" @click="commands.horizontal_rule">
Horizontal Rule
</button>
</editor-menu-bar>
<editor-content :editor="editor" />
</div>
</template>
<script>
import { Editor, EditorContent, EditorMenuBar } from 'tiptap'
import { HorizontalRule } from 'tiptap-extensions'
export default {
components: {
EditorMenuBar,
EditorContent,
},
data() {
return {
editor: new Editor({
extensions: [
HorizontalRule(),
],
content: `
<p>Some text.</p>
<hr />
<p>Text again.</p>
`,
}),
}
},
beforeDestroy() {
this.editor.destroy()
}
}
</script>
```

View File

@@ -142,7 +142,6 @@
link: /api/extensions/history link: /api/extensions/history
- title: HorizontalRule - title: HorizontalRule
link: /api/extensions/horizontal-rule link: /api/extensions/horizontal-rule
draft: true
- title: Italic - title: Italic
link: /api/extensions/italic link: /api/extensions/italic
- title: Link - title: Link