client/src/components/NoteInput.js
changeset 194 d19ba6045e82
parent 191 3f71ad81a5a9
equal deleted inserted replaced
193:99e342f9fb0c 194:d19ba6045e82
    18     startedAt: null,
    18     startedAt: null,
    19     finishedAt: null,
    19     finishedAt: null,
    20   }
    20   }
    21 
    21 
    22   onEditorChange = (e) => {
    22   onEditorChange = (e) => {
       
    23     let text = '';
       
    24     if(this.editor) {
       
    25       text = this.editor.asPlain();
       
    26     }
    23     this.setState({
    27     this.setState({
    24       buttonDisabled: e.value.document === 0,
    28       buttonDisabled: text.length === 0,
    25       startedAt: e.startedAt,
    29       startedAt: e.startedAt,
    26       finishedAt: e.finishedAt
    30       finishedAt: e.finishedAt
    27     });
    31     });
    28   }
    32   }
    29 
    33