We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 78793ef commit aa17708Copy full SHA for aa17708
content/home/examples/a-component-using-external-plugins.js
@@ -1,6 +1,7 @@
1
class MarkdownEditor extends React.Component {
2
constructor(props) {
3
super(props);
4
+ this.md = new Remarkable();
5
this.handleChange = this.handleChange.bind(this);
6
this.state = { value: 'Hello, **world**!' };
7
}
@@ -10,8 +11,7 @@ class MarkdownEditor extends React.Component {
10
11
12
13
getRawMarkup() {
- const md = new Remarkable();
14
- return { __html: md.render(this.state.value) };
+ return { __html: this.md.render(this.state.value) };
15
16
17
render() {
0 commit comments