import React, { Component } from 'react' import PropTypes from 'prop-types' import { RIETextArea } from 'riek' import Util from '../../Metamaps/Util' class MdTextArea extends RIETextArea { keyDown = (event) => { // we'll handle Enter on our own, thanks const ESC = 27 if (event.keyCode === ESC) { this.cancelEditing() } } renderNormalComponent = () => { // defaultProps MUST use dangerouslySetInnerHTML return } } class Desc extends Component { render = () => { const descHTML = (!this.props.desc && this.props.authorizedToEdit) ? '
Click to add description...
' : Util.mdToHTML(this.props.desc) if (this.props.authorizedToEdit) { return (