R
fn

isBlockActive

tested

Whether the focused block matches a type (and optionally a subset of attrs).

Signature

ts
export function isBlockActive(state: EditorState, type: string, attrs?: Attrs): boolean{ ... }

Parameters

ParameterTypeDescription
stateEditorState
typestring
attrs?Readonly<Record<string, import("..").AttrValue>> | undefined

Returns

boolean