0
0
mirror of https://github.com/naturalcrit/homebrewery.git synced 2026-01-15 10:32:45 +00:00

Workign on the homebrew

This commit is contained in:
Scott Tolksdorf
2015-12-17 19:28:22 -05:00
parent 5734b89bc6
commit f968421b5b
41 changed files with 636 additions and 219 deletions

View File

@@ -0,0 +1,40 @@
var React = require('react');
var _ = require('lodash');
var cx = require('classnames');
var Markdown = require('marked');
var Homebrew = React.createClass({
getInitialState: function() {
return {
text : "# test \nneato"
};
},
handleTextChange : function(e){
console.log(e.value);
this.setState({
text : e.target.value
})
},
render : function(){
var self = this;
console.log(this.state.text);
return(
<div className='homebrew'>
<textarea value={this.state.text} onChange={this.handleTextChange} />
<div className='phb' dangerouslySetInnerHTML={{__html:Markdown(this.state.text)}} />
</div>
);
}
});
module.exports = Homebrew;