- Source:
Members
-
<static> defaultSettings :object
-
Default settings for code editor.
Type:
- object
- Since:
-
- 4.9.0
- Source:
Methods
-
<static> initialize(textarea [, settings])
-
Initialize Code Editor (CodeMirror) for an existing textarea.
Parameters:
Name Type Argument Description textarea
string | jQuery | Element The HTML id, jQuery object, or DOM Element for the textarea that is used for the editor. settings
object <optional>
Settings to override defaults. Properties
Name Type Argument Description onChangeLintingErrors
function <optional>
Callback for when the linting errors have changed. onUpdateErrorNotice
function <optional>
Callback for when error notice should be displayed. onTabPrevious
function <optional>
Callback to handle tabbing to the previous tabbable element. onTabNext
function <optional>
Callback to handle tabbing to the next tabbable element. codemirror
object <optional>
Options for CodeMirror. csslint
object <optional>
Rules for CSSLint. htmlhint
object <optional>
Rules for HTMLHint. jshint
object <optional>
Rules for JSHint. - Since:
-
- 4.9.0
- Source:
Returns:
Instance.- Type
- CodeEditorInstance
Type Definitions
-
CodeEditorInstance
-
Type:
- object
- Source:
Properties:
Name Type Description settings
object The code editor settings. codemirror
CodeMirror The CodeMirror instance.