1
0
Fork 0
mirror of https://github.com/jashkenas/coffeescript.git synced 2022-11-09 12:23:24 -05:00

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