diff --git a/client/homebrew/editor/editor.jsx b/client/homebrew/editor/editor.jsx index 6857a215a..60bf7f1d6 100644 --- a/client/homebrew/editor/editor.jsx +++ b/client/homebrew/editor/editor.jsx @@ -1,23 +1,22 @@ var React = require('react'); var _ = require('lodash'); var cx = require('classnames'); -var SnippetIcons = require('./snippets/snippets.js'); +var CodeEditor = require('naturalcrit/codeEditor/codeEditor.jsx'); + +var Snippets = require('./snippets/snippets.js'); var Editor = React.createClass({ getDefaultProps: function() { return { - text : "", + value : "", onChange : function(){} }; }, - componentDidMount: function() { - this.refs.textarea.focus(); - }, - handleTextChange : function(e){ - this.props.onChange(e.target.value); + handleTextChange : function(text){ + this.props.onChange(text); }, iconClick : function(snippetFn){ @@ -28,7 +27,7 @@ var Editor = React.createClass({ }, renderTemplateIcons : function(){ - return _.map(SnippetIcons, (t) => { + return _.map(Snippets, (t) => { return
@@ -36,18 +35,20 @@ var Editor = React.createClass({
; }) }, + renderSnippetBar : function(){ + return
+ Snippet bar yo + +
+ }, render : function(){ - var self = this; return(
-
- {this.renderTemplateIcons()} -
-