Skip to content

Doc.markText method

Doc › markText

Unofficial

Marks a range of text with a specific CSS class.

Signature:

markText(from: Position, to: Position, options?: Cm5TextMarkerOptions | undefined): TextMarker

Parameters:

ParameterTypeDescription
fromPositionThe start position.
toPositionThe end position.
options?Cm5TextMarkerOptions | undefinedOptional marker options.

Returns: TextMarkerThe created text marker.