|
@ -2,7 +2,7 @@ class MarkdownEditor extends React.Component { |
|
|
constructor(props) { |
|
|
constructor(props) { |
|
|
super(props); |
|
|
super(props); |
|
|
this.handleChange = this.handleChange.bind(this); |
|
|
this.handleChange = this.handleChange.bind(this); |
|
|
this.state = { value: 'Type some *markdown* here!' }; |
|
|
this.state = { value: 'Hello, **world**!' }; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
handleChange(e) { |
|
|
handleChange(e) { |
|
@ -18,7 +18,11 @@ class MarkdownEditor extends React.Component { |
|
|
return ( |
|
|
return ( |
|
|
<div className="MarkdownEditor"> |
|
|
<div className="MarkdownEditor"> |
|
|
<h3>Input</h3> |
|
|
<h3>Input</h3> |
|
|
|
|
|
<label htmlFor="markdown-content"> |
|
|
|
|
|
Enter some markdown |
|
|
|
|
|
</label> |
|
|
<textarea |
|
|
<textarea |
|
|
|
|
|
id="markdown-content" |
|
|
onChange={this.handleChange} |
|
|
onChange={this.handleChange} |
|
|
defaultValue={this.state.value} |
|
|
defaultValue={this.state.value} |
|
|
/> |
|
|
/> |
|
|