docs/Script API/interfaces/Frontend_Script_API._internal_.CodeMirrorInstance.html
interface CodeMirrorInstance {
doc: {
getValue(): string;
markText(
from: number | { ch: number; line: number },
to: number | { ch: number; line: number },
opts: { className: string },
): any;
replaceRange(text: string, from: number, to: number): any;
setSelection(from: number, to: number): any;
};
clearHistory(): any;
focus(): any;
getCursor(): { ch: number; col: number; line: number };
getSelection(): string;
getValue(): string;
lineCount(): number;
on(event: string, callback: () => void): any;
operation(callback: () => void): any;
refresh(): any;
scrollIntoView(pos: number): any;
setCursor(line: number, col: number): any;
setOption(name: string, value: string): any;
setValue(val: string): any;
}
clearHistoryfocusgetCursorgetSelectiongetValuelineCountonoperationrefreshscrollIntoViewsetCursorsetOptionsetValue
doc: {
getValue(): string;
markText(
from: number | { ch: number; line: number },
to: number | { ch: number; line: number },
opts: { className: string },
): any;
replaceRange(text: string, from: number, to: number): any;
setSelection(from: number, to: number): any;
}
clearHistory(): any
focus(): any
getCursor(): { ch: number; col: number; line: number }
getSelection(): string
getValue(): string
lineCount(): number
on(event: string, callback: () => void): any
operation(callback: () => void): any
refresh(): any
scrollIntoView(pos: number): any
setCursor(line: number, col: number): any
setOption(name: string, value: string): any
setValue(val: string): any
Member Visibility
ThemeOSLightDark
Properties doc Methods clearHistoryfocusgetCursorgetSelectiongetValuelineCountonoperationrefreshscrollIntoViewsetCursorsetOptionsetValue