From 99f904adcc37d93c90defcd8ce898598e25be212 Mon Sep 17 00:00:00 2001 From: Hugues Hiegel Date: Wed, 11 Mar 2015 16:55:04 +0100 Subject: Lot of plugins --- codemirror_ui/lib/CodeMirror-2.3/demo/runmode.html | 49 ++++++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 codemirror_ui/lib/CodeMirror-2.3/demo/runmode.html (limited to 'codemirror_ui/lib/CodeMirror-2.3/demo/runmode.html') diff --git a/codemirror_ui/lib/CodeMirror-2.3/demo/runmode.html b/codemirror_ui/lib/CodeMirror-2.3/demo/runmode.html new file mode 100644 index 0000000..d6ee17e --- /dev/null +++ b/codemirror_ui/lib/CodeMirror-2.3/demo/runmode.html @@ -0,0 +1,49 @@ + + + + CodeMirror: Mode Runner Demo + + + + + + + +

CodeMirror: Mode Runner Demo

+ +
+ +

+
+    
+
+    

Running a CodeMirror mode outside of the editor. + The CodeMirror.runMode function, defined + in lib/runmode.js takes the following arguments:

+ +
+
text (string)
+
The document to run through the highlighter.
+
mode (mode spec)
+
The mode to use (must be loaded as normal).
+
output (function or DOM node)
+
If this is a function, it will be called for each token with + two arguments, the token's text and the token's style class (may + be null for unstyled tokens). If it is a DOM node, + the tokens will be converted to span elements as in + an editor, and inserted into the node + (through innerHTML).
+
+ + + -- cgit v1.2.3