mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-12-03 03:31:47 +00:00
Added execCommand and isReadOnly CodeMirror.Editor functions.
This commit is contained in:
Vendored
+6
@@ -2,6 +2,7 @@
|
||||
// Project: https://github.com/marijnh/CodeMirror
|
||||
// Definitions by: mihailik <https://github.com/mihailik>
|
||||
// nrbernard <https://github.com/nrbernard>
|
||||
// Pr1st0n <https://github.com/Pr1st0n>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
export = CodeMirror;
|
||||
@@ -336,6 +337,11 @@ declare namespace CodeMirror {
|
||||
"subtract" Reduce the indentation of the line. */
|
||||
indentLine(line: number, dir?: string): void;
|
||||
|
||||
/** Tells you whether the editor's content can be edited by the user. */
|
||||
isReadOnly(): boolean;
|
||||
|
||||
/** Runs the command with the given name on the editor. */
|
||||
execCommand(name: string): void;
|
||||
|
||||
/** Give the editor focus. */
|
||||
focus(): void;
|
||||
|
||||
@@ -68,3 +68,6 @@ myCodeMirror.on(
|
||||
);
|
||||
|
||||
CodeMirror.registerHelper("lint", "javascript", {});
|
||||
|
||||
myCodeMirror.isReadOnly();
|
||||
myCodeMirror.execCommand('selectAll');
|
||||
|
||||
Reference in New Issue
Block a user