Expand all

ve.ui.CodeMirrorAction

Extends

Constructor

new ve.ui.CodeMirrorAction(surface) #

CodeMirror action

Parameters:

Name Type Description
surface ve.ui.Surface

Surface to act on

Source:
CodeMirror action

Properties

Methods

toggle([enable]) → {Promise} #

Parameters:

Name Type Attributes Description
enable boolean optional

State to force toggle to, inverts current state if undefined

Returns:

Action was executed

Type
Promise
Source:

setHighlightStylesEnabled(enabled)static #

Enable or park the ::highlight() styles.

Browsers match these rules against the whole document on each style recalculation. In Chrome this costs seconds on a long article. Only the highlighter draws them, so park them while it does not draw.

Parameters:

Name Type Description
enabled boolean
Source:
Enable or park the ::highlight() styles.