yach.open.draft-edit
v0.0.3
Published
Rich Text Editor Based On Draft.js
Downloads
9
Maintainers
Readme
yach
edit base on draft
by braft-editor
install
npm i yach.page.usage.statistics
use
import React from "react";
import "yach.open.draft-edit/dist/index.css";
import Editor from "yach.open.draft-edit";
export default class PageDemo extends React.Component {
state = {
editorState: Editor.createEditorState(null),
};
render() {
return (
<Editor value={this.state.editorState} onChange={this.handleChange} />
);
}
handleChange = (editorState) => {
this.setState({ editorState });
};
}