Code Block Shiki
Code block extension with shiki for tiptap
WARNING
The extension will override Code block.
Installation
bash
npm install @note-editor/tiptap-extension-code-block-shiki
bash
pnpm add @note-editor/tiptap-extension-code-block-shiki
Usage
ts
import { Editor } from '@tiptap/core'
import { codeBlockShiki } from '@note-editor/tiptap-extension-code-block-shiki'
const editor = new Editor({
content: '<p>@note-editor/tiptap-extension-code-block-shiki</p>',
extensions: [
codeBlockShiki
]
})
Settings
theme
Theme for highlight, want to see more please check shiki themes
ts
codeBlockShiki.configure({
theme: 'vitesse-light' // default
})