forked from DefinitelyTyped/DefinitelyTyped
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request DefinitelyTyped#699 from mihailik/patch-1
Renaming 'CM' module to 'CodeMirror'
- Loading branch information
Showing
2 changed files
with
395 additions
and
394 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,18 @@ | ||
/// <reference path="codemirror.d.ts" /> | ||
|
||
var myCodeMirror = CodeMirror(document.body); | ||
var myCodeMirror: CodeMirror.Editor = CodeMirror(document.body); | ||
|
||
var myCodeMirror2 = CodeMirror(document.body, { | ||
var myCodeMirror2: CodeMirror.Editor = CodeMirror(document.body, { | ||
value: "function myScript(){return 100;}\n", | ||
mode: "javascript" | ||
}); | ||
|
||
var myTextArea; | ||
var myCodeMirror3 = CodeMirror(function (elt) { | ||
var myTextArea: HTMLTextAreaElement; | ||
var myCodeMirror3: CodeMirror.Editor = CodeMirror(function (elt) { | ||
myTextArea.parentNode.replaceChild(elt, myTextArea); | ||
}, { value: myTextArea.value }); | ||
|
||
var myCodeMirror4 = CodeMirror.fromTextArea(myTextArea); | ||
var myCodeMirror4: CodeMirror.Editor = CodeMirror.fromTextArea(myTextArea); | ||
|
||
var doc: CodeMirror.Doc = new CodeMirror.Doc('text'); | ||
var doc2: CodeMirror.Doc = CodeMirror(document.body).getDoc(); |
Oops, something went wrong.