Skip to content

CodeMirrorEditor.addOverlay method

CodeMirrorEditor › addOverlay

Unofficial

Add a search overlay to highlight matches in the editor.

Signature:

addOverlay(options: AddOverlayOptions): SearchQuery | undefined

Parameters:

Parameter Type Description
options AddOverlayOptions The overlay options containing the search pattern.

Returns: SearchQuery | undefinedThe search query, or undefined if the overlay could not be added.