-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Syntax Highlighter CodeMirror Editor
- Loading branch information
Showing
561 changed files
with
109,470 additions
and
0 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 |
---|---|---|
@@ -0,0 +1,18 @@ | ||
|
||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<title>CodeMirror</title> | ||
<meta charset="utf-8"> | ||
<link rel="stylesheet" type="text/css" href="plugin/codemirror/lib/codemirror.css"> | ||
</head> | ||
<body> | ||
<textarea class="codemirror-textarea">/* add css */</textarea> | ||
<textarea name="custom_css" id="custom-css"></textarea> | ||
<!-- javascript --> | ||
<script type="text/javascript" src="js/jquery.min.js"></script> | ||
<script type="text/javascript" src="plugin/codemirror/lib/codemirror.js"></script> | ||
<script src="plugin/codemirror/mode/css/css.js"></script> | ||
<script type="text/javascript" src="js/default.js"></script> | ||
</body> | ||
</html> |
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 |
---|---|---|
@@ -0,0 +1,14 @@ | ||
$(document).ready(function(){ | ||
//code here... | ||
var code = $(".codemirror-textarea")[0]; | ||
var editor = CodeMirror.fromTextArea(code, { | ||
lineNumbers : true, | ||
mode: "css" | ||
}); | ||
default_value_editor = editor.getValue(); | ||
$("#custom-css").val(default_value_editor); | ||
editor.on("change" , function(){ | ||
var custom_css = editor.getValue(); | ||
$("#custom-css").val(custom_css); | ||
}); | ||
}); |
Large diffs are not rendered by default.
Oops, something went wrong.
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 |
---|---|---|
@@ -0,0 +1,7 @@ | ||
root = true | ||
|
||
[*] | ||
indent_style = space | ||
indent_size = 2 | ||
end_of_line = lf | ||
charset = utf-8 |
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 |
---|---|---|
@@ -0,0 +1,8 @@ | ||
*.txt text eol=lf | ||
*.js text eol=lf | ||
*.html text eol=lf | ||
*.md text eol=lf | ||
*.json text eol=lf | ||
*.yml text eol=lf | ||
*.css text eol=lf | ||
*.svg text eol=lf |
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 |
---|---|---|
@@ -0,0 +1,11 @@ | ||
/node_modules | ||
/demo | ||
/doc | ||
/test | ||
/test*.html | ||
/index.html | ||
/mode/*/*test.js | ||
/mode/*/*.html | ||
/mode/index.html | ||
.* | ||
bin |
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 |
---|---|---|
@@ -0,0 +1,4 @@ | ||
language: node_js | ||
node_js: | ||
- stable | ||
sudo: false |
Oops, something went wrong.