2016-06-16 19:20:36 -03:00
|
|
|
import React, { PropTypes } from 'react';
|
2016-08-11 11:27:09 -03:00
|
|
|
import VisualEditor from './MarkdownControlElements/VisualEditor';
|
2016-08-03 10:30:42 -03:00
|
|
|
|
2016-08-01 16:41:55 -03:00
|
|
|
class MarkdownControl extends React.Component {
|
2016-05-30 16:55:32 -07:00
|
|
|
render() {
|
2016-08-11 11:27:09 -03:00
|
|
|
const { onChange, onAddMedia, getMedia, value } = this.props;
|
2016-05-30 16:55:32 -07:00
|
|
|
return (
|
2016-08-11 11:27:09 -03:00
|
|
|
<VisualEditor
|
|
|
|
onChange={onChange}
|
|
|
|
onAddMedia={onAddMedia}
|
|
|
|
getMedia={getMedia}
|
|
|
|
value={value}
|
|
|
|
/>
|
2016-08-01 16:41:55 -03:00
|
|
|
);
|
2016-05-30 16:55:32 -07:00
|
|
|
}
|
|
|
|
}
|
2016-06-16 19:20:36 -03:00
|
|
|
|
2016-08-01 16:41:55 -03:00
|
|
|
export default MarkdownControl;
|
|
|
|
|
2016-06-16 19:20:36 -03:00
|
|
|
MarkdownControl.propTypes = {
|
|
|
|
onChange: PropTypes.func.isRequired,
|
2016-08-08 18:51:53 -03:00
|
|
|
onAddMedia: PropTypes.func.isRequired,
|
|
|
|
getMedia: PropTypes.func.isRequired,
|
2016-06-16 19:20:36 -03:00
|
|
|
value: PropTypes.node,
|
|
|
|
};
|