editor cancels to initial state

This commit is contained in:
muerwre 2018-09-03 18:03:09 +07:00
parent bed9ea6948
commit fce88cac29
3 changed files with 50 additions and 4 deletions

View file

@ -69,6 +69,8 @@ export class App extends React.Component {
setTitle = title => this.setState({ title });
setAddress = address => this.setState({ address });
getTitle = () => this.state.title;
setDataOnLoad = data => {
this.clearChanged();
this.editor.setData(data);
@ -133,6 +135,7 @@ export class App extends React.Component {
getUser: this.getUser,
triggerOnChange: this.triggerOnChange,
clearChanged: this.clearChanged,
getTitle: this.getTitle,
});
authInit = () => {