From 5ae74e47f0a09147aa08fcca71f7d025ab847036 Mon Sep 17 00:00:00 2001 From: ido Date: Sun, 30 Nov 2014 13:59:44 +0200 Subject: [PATCH] change theme, remove selection --- playground/aceEditor.js | 4 +++- playground/main.browser.js | 6 ++++-- playground/main.js | 2 +- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/playground/aceEditor.js b/playground/aceEditor.js index 7696e77..546e3a9 100644 --- a/playground/aceEditor.js +++ b/playground/aceEditor.js @@ -33,13 +33,14 @@ var editor = React.createClass({ }, componentDidMount: function () { this.editor = brace.edit(this.state.editorId); +// this.editor.setTheme('ace/theme/monokai'); + this.editor.setTheme('ace/theme/solarized_light'); if (this.props.mode !== 'html') { this.editor.getSession().setMode('ace/mode/javascript'); } else { this.editor.getSession().setMode('ace/mode/html'); } this.editor.getSession().setUseWorker(false); - this.editor.setTheme('ace/theme/monokai'); var value = this.props.valueLink ? this.props.valueLink() : this.props.value; this.editor.setValue(value, 0); @@ -55,6 +56,7 @@ var editor = React.createClass({ } }.bind(this)); } + this.editor.clearSelection(); }, componentWillUnmount: function () { this.editor.destroy(); diff --git a/playground/main.browser.js b/playground/main.browser.js index 55b3d0c..d395aaa 100644 --- a/playground/main.browser.js +++ b/playground/main.browser.js @@ -68913,13 +68913,14 @@ var editor = React.createClass({ }, componentDidMount: function () { this.editor = brace.edit(this.state.editorId); +// this.editor.setTheme('ace/theme/monokai'); + this.editor.setTheme('ace/theme/solarized_light'); if (this.props.mode !== 'html') { this.editor.getSession().setMode('ace/mode/javascript'); } else { this.editor.getSession().setMode('ace/mode/html'); } this.editor.getSession().setUseWorker(false); - this.editor.setTheme('ace/theme/monokai'); var value = this.props.valueLink ? this.props.valueLink() : this.props.value; this.editor.setValue(value, 0); @@ -68935,6 +68936,7 @@ var editor = React.createClass({ } }.bind(this)); } + this.editor.clearSelection(); }, componentWillUnmount: function () { this.editor.destroy(); @@ -68955,7 +68957,7 @@ var _ = require('lodash'); var html = '
hello
'; var res = reactTemplates.convertTemplateToReact(html.trim()); -console.log(res); +//console.log(res); function emptyFunc() { return null; diff --git a/playground/main.js b/playground/main.js index 353f2f2..5f35252 100644 --- a/playground/main.js +++ b/playground/main.js @@ -10,7 +10,7 @@ var _ = require('lodash'); var html = '
hello
'; var res = reactTemplates.convertTemplateToReact(html.trim()); -console.log(res); +//console.log(res); function emptyFunc() { return null;