We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent daa2d8b commit 7103ff8Copy full SHA for 7103ff8
src/editors/string.js
@@ -377,10 +377,13 @@ JSONEditor.defaults.editors.string = JSONEditor.AbstractEditor.extend({
377
this.ace_editor.setValue(this.getValue());
378
379
// The theme
380
- if(JSONEditor.plugins.ace.theme) this.ace_editor.setTheme('ace/theme/'+JSONEditor.plugins.ace.theme);
+ if(JSONEditor.plugins.ace.theme) {
381
+ this.ace_editor.setTheme('ace/theme/'+JSONEditor.plugins.ace.theme);
382
+ }
383
// The mode
- mode = window.ace.require("ace/mode/"+mode);
- if(mode) this.ace_editor.getSession().setMode(new mode.Mode());
384
+ if(mode) {
385
+ this.ace_editor.getSession().setMode("ace/mode/"+mode);
386
387
388
// Listen for changes
389
this.ace_editor.on('change',function() {
0 commit comments