a ton of improvements

This commit is contained in:
Hans Pagel
2020-09-23 12:03:03 +02:00
parent 42b982b71c
commit 949f4ccb3d
24 changed files with 85 additions and 61 deletions

View File

@@ -1,7 +1,7 @@
# Heading
The Heading extension adds support for headings of different levels. Headings are rendered with `<h1>`, `<h2>`, `<h3>`, `<h4>`, `<h5>` or `<h6>` HTML tags. By default all six headline levels are enabled, but you can pass an array to only allow a few levels. Check the usage example to see how this is done.
Type `# ` at the beginning of a new line and it will magically transform to a headline, same for `## `, `### `, `#### `, `##### ` and `###### `.
Type <code>#&nbsp;</code> at the beginning of a new line and it will magically transform to a headline, same for <code>##&nbsp;</code>, <code>###&nbsp;</code>, <code>####&nbsp;</code>, <code>#####&nbsp;</code> and <code>######&nbsp;</code>.
## Installation
```bash
@@ -12,7 +12,7 @@ npm install @tiptap/extension-heading
yarn add @tiptap/extension-heading
```
## Options
## Settings
| Option | Type | Default | Description |
| ------ | ------ | ------------------ | -------------------------------------------- |
| class | string | | Add a custom class to the rendered HTML tag. |
@@ -35,4 +35,4 @@ yarn add @tiptap/extension-heading
[packages/extension-heading/](https://github.com/ueberdosis/tiptap-next/blob/main/packages/extension-heading/)
## Usage
<demo name="Extensions/Heading" highlight="" />
<demo name="Extensions/Heading" highlight="3-11,23,42-44" />