MCPcopy Create free account
hub / github.com/OpenEndedGroup/Field2 / loadMode

Function loadMode

lib/web/CodeMirror/src/display/mode_state.js:8–11  ·  view source on GitHub ↗
(cm)

Source from the content-addressed store, hash-verified

6// Used to get the editor into a consistent state again when options change.
7
8export function loadMode(cm) {
9 cm.doc.mode = getMode(cm.options, cm.doc.modeOption)
10 resetModeState(cm)
11}
12
13export function resetModeState(cm) {
14 cm.doc.iter(line => {

Callers 2

attachDocFunction · 0.90
defineOptionsFunction · 0.90

Calls 2

getModeFunction · 0.90
resetModeStateFunction · 0.70

Tested by

no test coverage detected