Daniel Emod Kovacs
5 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
2 additions and
2 deletions
-
content/home/examples/a-component-using-external-plugins.js
|
|
@ -1,6 +1,7 @@ |
|
|
|
class MarkdownEditor extends React.Component { |
|
|
|
constructor(props) { |
|
|
|
super(props); |
|
|
|
this.md = new Remarkable(); |
|
|
|
this.handleChange = this.handleChange.bind(this); |
|
|
|
this.state = { value: 'Hello, **world**!' }; |
|
|
|
} |
|
|
@ -10,8 +11,7 @@ class MarkdownEditor extends React.Component { |
|
|
|
} |
|
|
|
|
|
|
|
getRawMarkup() { |
|
|
|
const md = new Remarkable(); |
|
|
|
return { __html: md.render(this.state.value) }; |
|
|
|
return { __html: this.md.render(this.state.value) }; |
|
|
|
} |
|
|
|
|
|
|
|
render() { |
|
|
|