diff --git a/HISTORY.md b/HISTORY.md index 0b6d09c..f189720 100644 --- a/HISTORY.md +++ b/HISTORY.md @@ -6,6 +6,7 @@ https://github.com/josdejong/jsoneditor ## not yet released, version 5.4.0 - Upgraded all dependencies. +- Fixed #290: `setText()` not working in mode text or code. ## 2016-04-06, version 5.3.0 diff --git a/src/js/textmode.js b/src/js/textmode.js index b5c185e..15d3689 100644 --- a/src/js/textmode.js +++ b/src/js/textmode.js @@ -371,6 +371,8 @@ textmode.getText = function() { * @param {String} jsonText */ textmode.setText = function(jsonText) { + var text; + if (this.options.escapeUnicode === true) { text = util.escapeUnicodeChars(jsonText); }