mirror of
https://github.com/ueberdosis/tiptap.git
synced 2025-01-18 14:13:21 +08:00
replace headline with heading
This commit is contained in:
parent
eca9dcd40d
commit
13c95b602e
@ -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()
|
||||
})
|
||||
|
@ -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># </code> at the beginning of a new line and it will magically transform to a headline, same for <code>## </code>, <code>### </code>, <code>#### </code>, <code>##### </code> and <code>###### </code>.
|
||||
Type <code># </code> at the beginning of a new line and it will magically transform to a heading, same for <code>## </code>, <code>### </code>, <code>#### </code>, <code>##### </code> and <code>###### </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 |
|
||||
|
@ -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*. That’s the case for **bold**, *italic* or ~~striked~~ text. [Links](#) are *Marks*, too.
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user