Skip to main content

getMarkRange

@blockslides/core


@blockslides/core / getMarkRange

Function: getMarkRange()

getMarkRange($pos, type, attributes?): void | Range

Defined in: blockslides/packages/core/src/helpers/getMarkRange.ts:30

Get the range of a mark at a resolved position.

Parameters

$pos

ResolvedPos

The position to get the mark range for.

type

MarkType

The mark type to get the range for.

attributes?

Record<string, any>

The attributes to match against. If not provided, only the first mark at the position will be matched.

Returns

void | Range