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 |
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.
Type:
- number
The maximum document size that CodeMirror will handle.
Methods
onSelect()
#
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
Whether the CSS Custom Highlight API mode is in use.