- Rich Text Editor for education purpose.
- This project is no longer maintained.
http://cdn.summitlearning.org/assets/index_latest.html
- Clone the repository to your local machine.
git clone [email protected]:chanzuckerberg/docs-editor.git
- Check if your Node.js version is >= 6.
- Start with the project folder
cd docs-editor
- Run
npm install
(just for the first time build)
- Start with the project folder
cd docs-editor
- Run
killall -9 node; npm run start
to start the local dev server - Load http://127.0.0.1:3001/index.html
- Push changes to master
- Start with the project folder
cd docs-editor
- Build master from dev server
killall -9 node; NODE_ENV=production npm run build
- Build deploy command
python generate_deploy_script.py
- Execute the command
sh deploy_to_s3.sh
- Verify that the files are available on s3.
import {DocsEditor, convertFromRaw, convertToRaw} from 'docs-editor';
class DemoApp extends React.PureComponent<any, any, any> {
state = convertFromRaw();
render(): React.Element<any> {
return (
<DocsEditor
editorState={this.state.editorState}
onChange={this._onChange}
/>
);
}
_onChange = (editorState: Object): void => {
this.setState({editorState});
console.log(convertToRaw(editorState));
};
}