fn

toggleBlockType

tested

Toggle 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

ParameterTypeDescription
typestring
attrs?Attrs
fallback?string

Returns

Command