Editor Toolbar
BlockquoteButton & CodeBlockButton
Toggle blockquote and code block nodes.
Install
npx typix ui add blockquote-button code-block-buttonBlockquoteButton
import { BlockquoteButton } from "@/components/typix/main/blockquote-button";
<BlockquoteButton />
<BlockquoteButton hideWhenUnavailable />CodeBlockButton
import { CodeBlockButton } from "@/components/typix/main/code-block-button";
<CodeBlockButton />
<CodeBlockButton hideWhenUnavailable />Props (both)
| Prop | Type | Default | Description |
|---|---|---|---|
text | string | — | Override the button label. |
hideWhenUnavailable | boolean | false | Hide when unavailable. |
showShortcut | boolean | true | Show keyboard shortcut in tooltip. |
onToggled | (isActive: boolean) => void | — | Callback after toggle. |
className | string | — | Additional CSS classes. |
Hooks
import { useBlockquote } from "@/components/typix/main/blockquote-button";
import { useCodeBlock } from "@/components/typix/main/code-block-button";