fn
toggleMark
testedToggle a mark. On a collapsed caret it flips the stored marks (applied to the next typed character); on a range it adds/removes the mark across it, honoring the mark's `excludes`. Cross-block ranges are deferred to M2 (returns false).
Signature
ts
export function toggleMark(type: string, attrs?: Attrs): Command{ ... }Parameters
| Parameter | Type | Description |
|---|---|---|
type | string | — |
attrs? | Readonly<Record<string, import("..").AttrValue>> | undefined | — |
Returns
Command