Expand all

abstract ve.ui.CodeMirrorTool

Extends

Constructor

new ve.ui.CodeMirrorTool(toolGroup, [config])abstract #

VisualEditor UserInterface CodeMirror tool.

Parameters:

Name Type Attributes Description
toolGroup OO.ui.ToolGroup
config Object optional

Configuration options

Source:
VisualEditor UserInterface CodeMirror tool.

Properties

maxDocSize :numberstatic #

The maximum document size that CodeMirror will handle. VisualEditor uses an infinite viewport which causes massive performance problems in CodeMirror on very large pages, and can even crash the browser. Until the integration is reworked, or VE uses a finite viewport, we put a hard limit on the document size that CodeMirror will attempt to load.

See https://phabricator.wikimedia.org/T184857 T184857}

Type:

  • number
Source:
The maximum document size that CodeMirror will handle.

Methods

onSurfaceChange() #

useCustomHighlight() → {boolean}static #

Whether the CSS Custom Highlight API mode is in use. That controller highlights only the viewport, so it is exempt from the ve.ui.CodeMirrorTool.maxDocSize limit.

Returns:

Type
boolean
Source:
Whether the CSS Custom Highlight API mode is in use.