Skip to main content

getTextBetween

@blockslides/core


@blockslides/core / getTextBetween

Function: getTextBetween()

getTextBetween(startNode, range, options?): string

Defined in: blockslides/packages/core/src/helpers/getTextBetween.ts:13

Gets the text between two positions in a Prosemirror node and serializes it using the given text serializers and block separator (see getText)

Parameters

startNode

Node

The Prosemirror node to start from

range

Range

The range of the text to get

options?

Options for the text serializer & block separator

blockSeparator?

string

textSerializers?

Record<string, TextSerializer>

Returns

string

The text between the two positions