WYSIWYG Medium-like editor for react
npm install --save react-slate-medium-editor
import React, { Component } from "react";
import { ReactSlateMediumEditor } from "react-slate-medium-editor";
class Example extends Component {
state = {
value: null
};
onChange = value => {
this.setState({ value });
};
render() {
return (
<ReactSlateMediumEditor
onChange={this.onChange}
value={value}
onFileSelected={file => someFunction(file)}
/>
);
}
}
MIT © ntgussoni