R
fn

isMarkActive

tested

Whether a mark is active for the current selection — used by `toggleMark` and by toolbars (call a command without `dispatch` for the same answer).

Signature

ts
export function isMarkActive(state: EditorState, type: string): boolean{ ... }

Parameters

ParameterTypeDescription
stateEditorState
typestring

Returns

boolean