Allow copying JavaScript from examples

This commit is contained in:
Geoffrey Booth
2017-01-12 22:08:11 -08:00
parent 52bc1dab0b
commit 9e13100f58
3 changed files with 10 additions and 2 deletions

View File

@@ -372,6 +372,10 @@ textarea {
font-weight: 400;
line-height: 1.25;
}
.CodeMirror-cursor {
/* https://github.com/codemirror/CodeMirror/issues/2568 */
display: none;
}
/*
* Try CoffeeScript
@@ -3655,7 +3659,7 @@ $(document).ready ->
lineWrapping: on
lineNumbers: off
inputStyle: 'contenteditable'
readOnly: if mode is 'coffeescript' then no else 'nocursor'
readOnly: mode isnt 'coffeescript' # Cant use 'nocursor' if we want the JavaScript to be copyable
viewportMargin: Infinity
# Whenever the user edits the CoffeeScript side of a code example, update the JavaScript output

View File

@@ -56,7 +56,7 @@ $(document).ready ->
lineWrapping: on
lineNumbers: off
inputStyle: 'contenteditable'
readOnly: if mode is 'coffeescript' then no else 'nocursor'
readOnly: mode isnt 'coffeescript' # Cant use 'nocursor' if we want the JavaScript to be copyable
viewportMargin: Infinity
# Whenever the user edits the CoffeeScript side of a code example, update the JavaScript output

View File

@@ -352,6 +352,10 @@ textarea {
font-weight: 400;
line-height: 1.25;
}
.CodeMirror-cursor {
/* https://github.com/codemirror/CodeMirror/issues/2568 */
display: none;
}
/*
* Try CoffeeScript