import React, { Component } from 'react';

class Showmarkdown extends Component {
  constructor(props) {
    super(props);
    this.state = {

    }
  }
  componentDidMount() {

    if (this.props.descriptions) {

      window.editormd.markdownToHTML("memo_content_editorMd", {
        htmlDecode: "style,script,iframe",  // you can filter tags decode
        taskList: true,
        tex: true,  // 默认不解析
        flowChart: true,  // 默认不解析
        sequenceDiagram: true // 默认不解析
      });

    }
  }

  render() {

    return (
      <div id="memo_content_editorMd" className="new_li">
        <textarea style={{ 'display': 'none' }}>
          {this.props.descriptions}
        </textarea>
      </div>
    )
  }
}

export default Showmarkdown;