From 06384f6bc0b8355579ef909ed001cc36b2206ce4 Mon Sep 17 00:00:00 2001 From: Anton Dyudin Date: Tue, 26 May 2015 14:23:39 -0700 Subject: [PATCH] re-add CM react --- base/pub/tree/src/js/components/CodeMirror.coffee | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 base/pub/tree/src/js/components/CodeMirror.coffee diff --git a/base/pub/tree/src/js/components/CodeMirror.coffee b/base/pub/tree/src/js/components/CodeMirror.coffee new file mode 100644 index 0000000000..0e4f36c227 --- /dev/null +++ b/base/pub/tree/src/js/components/CodeMirror.coffee @@ -0,0 +1,8 @@ +recl = React.createClass +[div,textarea] = [React.DOM.div,React.DOM.textarea] + +module.exports = recl + render: -> div {}, textarea ref:'ed', value:@props.value + componentDidMount: -> + CodeMirror.fromTextArea @refs.ed.getDOMNode(), + readOnly:true