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.
typesetting/pitfall/pdfkit/node_modules/brace/example/json-editor.js

17 lines
380 B
JavaScript

var ace = require('brace');
require('brace/mode/json');
require('brace/theme/solarized_light');
var editor = ace.edit('json-editor');
editor.getSession().setMode('ace/mode/json');
editor.setTheme('ace/theme/solarized_light');
editor.setValue([
'{'
, ' "language": "JSON",'
, ' "foo": "bar",'
, ' "trailing": "comma",'
, '}'
].join('\n')
);
editor.clearSelection();