Created
February 20, 2012 23:37
-
-
Save micrypt/1872313 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
//This wee bit o' CoffeeScript | |
editor = CodeMirror.fromTextArea(document.getElementById('id_body'), | |
mode: "markdown" | |
lineNumbers: false | |
lineWrapping: true | |
onCursorActivity: () -> | |
setLineClass(hlLine, null) | |
hlLine = editor.setLineClass(editor.getCursor().line, "activeline")) | |
hlLine = window.editor.setLineClass(0, "activeline") | |
$(() -> $('.create #id_title').focus()) |
This file contains hidden or 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
//Compiles to this and proceeds to vex me… | |
(function() { | |
var editor, hlLine; | |
editor = CodeMirror.fromTextArea(document.getElementById('id_body'), { | |
mode: "markdown", | |
lineNumbers: false, | |
lineWrapping: true, | |
onCursorActivity: function() { | |
var hlLine; | |
setLineClass(hlLine, null); | |
return hlLine = editor.setLineClass(editor.getCursor().line, "activeline"); | |
} | |
}); | |
hlLine = window.editor.setLineClass(0, "activeline"); | |
$(function() { | |
return $('.create #id_title').focus(); | |
}); | |
}).call(this); |
This file contains hidden or 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
editor = CodeMirror.fromTextArea(document.getElementById('id_body'), | |
mode: "markdown" | |
lineNumbers: false | |
lineWrapping: true | |
onCursorActivity: () -> | |
setLineClass(hlLine, null) | |
hlLine = editor.setLineClass(editor.getCursor().line, "activeline")) | |
hlLine = window.editor.setLineClass(0, "activeline") | |
$(() -> $('.create #id_title').focus()) | |
Compiles to this and proceeds to vex me… | |
(function() { | |
var editor, hlLine; | |
editor = CodeMirror.fromTextArea(document.getElementById('id_body'), { | |
mode: "markdown", | |
lineNumbers: false, | |
lineWrapping: true, | |
onCursorActivity: function() { | |
var hlLine; | |
setLineClass(hlLine, null); | |
return hlLine = editor.setLineClass(editor.getCursor().line, "activeline"); | |
} | |
}); | |
hlLine = window.editor.setLineClass(0, "activeline"); | |
$(function() { | |
return $('.create #id_title').focus(); | |
}); | |
}).call(this); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment