replace headline with heading

This commit is contained in:
Hans Pagel 2020-09-27 10:40:08 +02:00
parent eca9dcd40d
commit 13c95b602e
3 changed files with 9 additions and 9 deletions

View File

@ -46,7 +46,7 @@ context('/api/extensions/heading', () => {
.should('contain', 'Example Text')
})
it('the button should toggle the headline', () => {
it('the button should toggle the heading', () => {
cy.get('.ProseMirror h1')
.should('not.exist')
@ -64,7 +64,7 @@ context('/api/extensions/heading', () => {
.should('not.exist')
})
it('should make a headline from the default markdown shortcut', () => {
it('should make a heading from the default markdown shortcut', () => {
cy.get('.ProseMirror').then(([{ editor }]) => {
editor.clearContent()
})

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.
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 heading levels (or styles) 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 <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>.
Type <code>#&nbsp;</code> at the beginning of a new line and it will magically transform to a heading, same for <code>##&nbsp;</code>, <code>###&nbsp;</code>, <code>####&nbsp;</code>, <code>#####&nbsp;</code> and <code>######&nbsp;</code>.
## Installation
```bash
@ -13,10 +13,10 @@ yarn add @tiptap/extension-heading
```
## Settings
| Option | Type | Default | Description |
| ------ | ------ | ------------------ | -------------------------------------------- |
| class | string | | Add a custom class to the rendered HTML tag. |
| levels | Array | [1, 2, 3, 4, 5, 6] | Specifies which headlines are supported. |
| Option | Type | Default | Description |
| ------ | ------ | ------------------ | --------------------------------------------- |
| class | string | | Add a custom class to the rendered HTML tag. |
| levels | Array | [1, 2, 3, 4, 5, 6] | Specifies which heading levels are supported. |
## Commands
| Command | Options | Description |

View File

@ -76,7 +76,7 @@ class Text extends Node {
## Difference between a Node and a Mark
*Nodes* are like blocks of content, for example paragraphs, headlines, code blocks, blockquotes and many more.
*Nodes* are like blocks of content, for example paragraphs, headings, code blocks, blockquotes and many more.
*Marks* can apply a different style to specific parts of text inside a *Node*. Thats the case for **bold**, *italic* or ~~striked~~ text. [Links](#) are *Marks*, too.