fn
toggleBlockType
testedToggle the focused block between `type` (with `attrs`) and a fallback type (default `paragraph`). Powers heading shortcuts and conversion toggles.
Signature
ts
export function toggleBlockType(type: string, attrs?: Attrs, fallback = 'paragraph'): Command{ ... }Parameters
| Parameter | Type | Description |
|---|---|---|
type | string | — |
attrs? | Readonly<Record<string, import("..").AttrValue>> | undefined | — |
fallback? | string | — |
Returns
Command