You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
17 lines
412 B
JavaScript
17 lines
412 B
JavaScript
7 years ago
|
var ace = require('brace');
|
||
|
require('brace/mode/coffee');
|
||
|
require('brace/theme/vibrant_ink');
|
||
|
|
||
|
var editor = ace.edit('coffee-editor');
|
||
|
editor.setTheme('ace/theme/vibrant_ink');
|
||
|
editor.getSession().setMode('ace/mode/coffee');
|
||
|
editor.setValue([
|
||
|
'# Coffee'
|
||
|
, 'square = (x) -> x * x'
|
||
|
, ''
|
||
|
, '# below line has an error which is annotated'
|
||
|
, 'square = x -> x * '
|
||
|
].join('\n')
|
||
|
);
|
||
|
editor.clearSelection();
|