equal
deleted
inserted
replaced
15 const text = Plain.serialize(state); |
15 const text = Plain.serialize(state); |
16 this.setState({ buttonDisabled: text.length === 0 }); |
16 this.setState({ buttonDisabled: text.length === 0 }); |
17 } |
17 } |
18 |
18 |
19 onAddNoteClick = () => { |
19 onAddNoteClick = () => { |
20 const text = this.refs.editor.asPlain(); |
20 const plain = this.refs.editor.asPlain(); |
21 this.props.addNote(this.props.session, text); |
21 const raw = this.refs.editor.asRaw(); |
|
22 |
|
23 this.props.addNote(this.props.session, { |
|
24 plain: plain, |
|
25 raw: raw |
|
26 }); |
|
27 |
22 this.refs.editor.clear(); |
28 this.refs.editor.clear(); |
23 setTimeout(() => this.refs.editor.focus(), 250); |
29 setTimeout(() => this.refs.editor.focus(), 250); |
24 } |
30 } |
25 |
31 |
26 componentDidMount() { |
32 componentDidMount() { |