rename the code block extension, add content to the code block extension

This commit is contained in:
Hans Pagel
2020-09-10 16:54:53 +02:00
parent 692994167e
commit 89b5f04aac
11 changed files with 91 additions and 25 deletions

View File

@@ -2,10 +2,20 @@
Enables you to use the `<pre>` HTML tag in the editor.
## Options
*None*
| Option | Type | Default | Description |
| ------ | ------ | ------- | -------------------------------------------- |
| class | string | | Add a custom class to the rendered HTML tag. |
## Commands
*None*
| Command | Options | Description |
| --------- | ------- | ----------------------------- |
| codeBlock | — | Wrap content in a code block. |
## Keyboard shortcuts
*None*
* `Shift` + `Control` + `\`
## Source Code
[packages/extension-code-block/](https://github.com/ueberdosis/tiptap-next/blob/main/packages/extension-code-block/)
## Usage
<demo name="Extensions/CodeBlock" highlight="3-5,17,36" />