Sublime demo is not working
See original GitHub issueI copied all code from demo/sublime.html but its not working on my localhost. However basic demo is working.
Here is my code-
<link rel="stylesheet" href="aryan/assets/codemirror/codemirror.css">
<link rel="stylesheet" href="aryan/assets/codemirror/foldgutter.css">
<link rel="stylesheet" href="aryan/assets/codemirror/dialog.css">
<link rel="stylesheet" href="aryan/assets/codemirror/monokai.css">
<script src="aryan/assets/codemirror/codemirror.js"></script>
<script src="aryan/assets/codemirror/searchcursor.js"></script>
<script src="aryan/assets/codemirror/search.js"></script>
<script src="aryan/assets/codemirror/dialog.js"></script>
<script src="aryan/assets/codemirror/matchbrackets.js"></script>
<script src="aryan/assets/codemirror/closebrackets.js"></script>
<script src="aryan/assets/codemirror/comment.js"></script>
<script src="aryan/assets/codemirror/hardwrap.js"></script>
<script src="aryan/assets/codemirror/foldcode.js"></script>
<script src="aryan/assets/codemirror/brace-fold.js"></script>
<script src="aryan/assets/codemirror/javascript.js"></script>
<script src="aryan/assets/codemirror/sublime.js"></script>
<script type="text/javascript">
var editor = CodeMirror.fromTextArea(document.getElementById("editor"), {
lineNumbers: true,
//mode: "text/html",
matchBrackets: true
});
// var value = "// The bindings defined specifically in the Sublime Text mode\nvar bindings = {\n";
// var map = CodeMirror.keyMap.sublime;
// for (var key in map) {
// var val = map[key];
// if (key != "fallthrough" && val != "..." && (!/find/.test(val) || /findUnder/.test(val)))
// value += " \"" + key + "\": \"" + val + "\",\n";
// }
// value += "}\n\n// The implementation of joinLines\n";
// value += CodeMirror.commands.joinLines.toString().replace(/^function\s*\(/, "function joinLines(").replace(/\n /g, "\n") + "\n";
// var editor = CodeMirror(document.getElementById("editor"), {
// value: value,
// lineNumbers: true,
// mode: "javascript",
// keyMap: "sublime",
// autoCloseBrackets: true,
// matchBrackets: true,
// showCursorWhenSelecting: true,
// theme: "monokai",
// tabSize: 2
// });
</script>
Issue Analytics
- State:
- Created 7 years ago
- Comments:7 (3 by maintainers)
Top Results From Across the Web
Sublime demo is not working · Issue #3930 - GitHub
I copied all code from demo/sublime.html but its not working on my localhost. However basic demo is working. Here is my code-
Read more >So, what's stopping me from using the evaluation version and ...
While Sublime is in the unregistered evaluation mode, you get nag popups after every few saves to remind you that you haven't paid...
Read more >Learn How to Use Sublime Text: A Quick Overview - Kinsta
To run code in Sublime Text, go to Tools > Build System, and select the language for your code (Sublime comes with support...
Read more >Sublime Text bindings demo - CodeMirror
Enable the keymap by loading keymap/sublime.js and setting the keyMap option to "sublime " . (A lot of the search functionality is still...
Read more >Chromium Docs - Using Sublime Text as your IDE - Google Git
Check out some visual demos for a quick demonstration. You can download and install Sublime Text 3 from ... Linux; Mac (not working);...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
You just randomly pasted some stuff in a fiddle. You need to actually include JS libraries, etc. I recommend you learn basic HTML/JS before attempting to use a third party library like CodeMirror.
The jsfiddle just has an SSL issue, except for that it works. You included
codemirror.css
overhttp://
on jsfiddle, which uses https. Use//
orhttps://
instead and you’ll be fine. https://jsfiddle.net/mj8Lh59n/8/