Skip to content

CodeMirrorModule.overlayMode method

CodeMirrorModule › overlayMode

Unofficial

Utility function to create an overlay mode combining two modes.

Signature:

overlayMode(base: Cm5Mode<unknown>, overlay: Cm5Mode<unknown>, combine?: boolean | undefined): Cm5Mode<unknown>

Parameters:

Parameter Type Description
base Cm5Mode<unknown> The base mode.
overlay Cm5Mode<unknown> The overlay mode.
combine? boolean | undefined Whether to combine styles instead of letting overlay win.

Returns: Cm5Mode<unknown>The combined mode.