client/src/components/NoteInput.js
changeset 26 930e486ad0a8
parent 21 284e866f55c7
child 29 4cfeabef7d5e
equal deleted inserted replaced
25:e04714a1d4eb 26:930e486ad0a8
    24 
    24 
    25   onAddNoteClick = () => {
    25   onAddNoteClick = () => {
    26     const plain = this.refs.editor.asPlain();
    26     const plain = this.refs.editor.asPlain();
    27     const raw = this.refs.editor.asRaw();
    27     const raw = this.refs.editor.asRaw();
    28     const html = this.refs.editor.asHtml();
    28     const html = this.refs.editor.asHtml();
       
    29     const categories = this.refs.editor.asCategories();
    29 
    30 
    30     this.props.addNote(this.props.session, {
    31     this.props.addNote(this.props.session, {
    31       plain: plain,
    32       plain: plain,
    32       raw: raw,
    33       raw: raw,
    33       html: html,
    34       html: html,
    34 
    35 
    35       startedAt: this.state.startedAt,
    36       startedAt: this.state.startedAt,
    36       finishedAt: moment().format('H:mm:ss')
    37       finishedAt: moment().format('H:mm:ss'),
       
    38       categories: categories,
    37     });
    39     });
    38 
    40 
    39     this.refs.editor.clear();
    41     this.refs.editor.clear();
    40     setTimeout(() => this.refs.editor.focus(), 250);
    42     setTimeout(() => this.refs.editor.focus(), 250);
    41   }
    43   }