2018-03-12 14:02:34 +01:00
|
|
|
/**
|
|
|
|
|
*
|
|
|
|
|
* WysiwygEditor
|
|
|
|
|
*
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
import React from 'react';
|
|
|
|
|
import { Editor } from 'draft-js';
|
2018-03-14 09:59:42 +01:00
|
|
|
import PropTypes from 'prop-types';
|
2018-03-12 14:02:34 +01:00
|
|
|
|
|
|
|
|
class WysiwygEditor extends React.Component {
|
|
|
|
|
render() {
|
|
|
|
|
return (
|
2018-03-14 09:59:42 +01:00
|
|
|
<Editor {...this.props} ref={this.props.setRef} />
|
2018-03-12 14:02:34 +01:00
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2018-03-14 09:59:42 +01:00
|
|
|
WysiwygEditor.defaultProps = {
|
|
|
|
|
setRef: () => {},
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
WysiwygEditor.propTypes = {
|
|
|
|
|
setRef: PropTypes.func,
|
|
|
|
|
};
|
|
|
|
|
|
2018-03-12 14:02:34 +01:00
|
|
|
export default WysiwygEditor;
|