From 2bc4cf7dfeb1498237652d75a58ee8ba5f2623a9 Mon Sep 17 00:00:00 2001 From: jos Date: Sat, 12 Nov 2016 10:38:04 +0100 Subject: [PATCH] Fixed mode code not reckoning with option escapeUnicode --- src/components/CodeMode.js | 16 ---------------- src/components/TextMode.js | 1 + 2 files changed, 1 insertion(+), 16 deletions(-) diff --git a/src/components/CodeMode.js b/src/components/CodeMode.js index 7092150..b084da4 100644 --- a/src/components/CodeMode.js +++ b/src/components/CodeMode.js @@ -60,20 +60,4 @@ export default class CodeMode extends TextMode { this.props.options.onChangeText() } } - - /** - * Set a string containing a JSON document - * @param {string} text - */ - setText (text) { - this.setState({text}) - } - - /** - * Get the JSON document as text - * @return {string} text - */ - getText () { - return this.state.text - } } \ No newline at end of file diff --git a/src/components/TextMode.js b/src/components/TextMode.js index fdd31c1..b5bcada 100644 --- a/src/components/TextMode.js +++ b/src/components/TextMode.js @@ -177,6 +177,7 @@ export default class TextMode extends Component { this.setText(event.target.value) if (this.props.options && this.props.options.onChangeText) { + // TODO: pass a diff this.props.options.onChangeText() } }