From 96304f83a78687c243cf7c2a2057f5305c23282b Mon Sep 17 00:00:00 2001 From: jos Date: Sat, 9 Apr 2016 20:11:41 +0200 Subject: [PATCH] Fixed #290: `setText()` not working in mode text or code --- HISTORY.md | 1 + src/js/textmode.js | 2 ++ 2 files changed, 3 insertions(+) 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); }