fn
isBlockActive
testedWhether 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
| Parameter | Type | Description |
|---|---|---|
state | EditorState | — |
type | string | — |
attrs? | Readonly<Record<string, import("..").AttrValue>> | undefined | — |
Returns
boolean