Expand all

CodeMirrorCss

CSS language support for CodeMirror.

Example

const require = await mw.loader.using( [ 'ext.CodeMirror.v6', 'ext.CodeMirror.v6.modes' ] );
const CodeMirror = require( 'ext.CodeMirror.v6' );
const { css } = require( 'ext.CodeMirror.v6.modes' );
const cm = new CodeMirror( myTextarea, css() );
cm.initialize();

Extends

Properties

dialect :string #

The dialect of the mode. Either normal css or sanitized-css for TemplateStyles.

Type:

  • string
Source:
The dialect of the mode.

extension #

The complete set of extensions for this mode, including the language and any supporting extensions.

Overrides:
Source:

The complete set of extensions for this mode, including the language and any supporting extensions.

hasWorker #

Whether the mode should load a web worker.

Overrides:
Source:
Whether the mode should load a web worker.

language :Language #

The language object.

Type:

Overrides:
Source:
The language object.

lintApi :LintSource|undefined #

The function to lint the code in the editor using a MediaWiki API.

Type:

Overrides:
Source:
The function to lint the code in the editor using a MediaWiki API.

lintSource :LintSource|undefined #

The function to lint the code in the editor.

Type:

Overrides:
Source:
The function to lint the code in the editor.

name :string #

The name of the mode.

Type:

  • string
Overrides:
Source:
The name of the mode.

support :Extension #

Supporting extensions.

Type:

Overrides:
Source:
Supporting extensions.

worker :CodeMirrorWorker|undefined #

The web worker for the mode, if any.

Type:

Overrides:
Source:
The web worker for the mode, if any.