You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

16 lines
380 B

10 months ago
  1. var ace = require('brace');
  2. require('brace/mode/json');
  3. require('brace/theme/solarized_light');
  4. var editor = ace.edit('json-editor');
  5. editor.getSession().setMode('ace/mode/json');
  6. editor.setTheme('ace/theme/solarized_light');
  7. editor.setValue([
  8. '{'
  9. , ' "language": "JSON",'
  10. , ' "foo": "bar",'
  11. , ' "trailing": "comma",'
  12. , '}'
  13. ].join('\n')
  14. );
  15. editor.clearSelection();