mirror of
https://github.com/ueberdosis/tiptap.git
synced 2024-12-15 11:09:01 +08:00
1.0 KiB
1.0 KiB
Code
The Code extensions enables you to use the <code>
HTML tag in the editor. If you paste in text with <code>
tags it will rendered accordingly.
Type something with `back-ticks around`
and it will magically transform to inline code
while you type.
Installation
# With npm
npm install @tiptap/extension-code
# Or: With Yarn
yarn add @tiptap/extension-code
Settings
Option | Type | Default | Description |
---|---|---|---|
class | string | – | Add a custom class to the rendered HTML tag. |
Commands
Command | Options | Description |
---|---|---|
code | — | Mark text as inline code. |
Keyboard shortcuts
Alt
`