client/src/components/NoteInput.js
changeset 78 49c5ea36d0a4
parent 77 cd27d9fc1c73
child 79 772b73e31069
equal deleted inserted replaced
77:cd27d9fc1c73 78:49c5ea36d0a4
    30 
    30 
    31     const plain = this.refs.editor.asPlain();
    31     const plain = this.refs.editor.asPlain();
    32     const raw = this.refs.editor.asRaw();
    32     const raw = this.refs.editor.asRaw();
    33     const html = this.refs.editor.asHtml();
    33     const html = this.refs.editor.asHtml();
    34     const categories = this.refs.editor.asCategories();
    34     const categories = this.refs.editor.asCategories();
       
    35     const marginComment = this.marginComment.value;
    35 
    36 
    36     this.props.notesActions.addNote(this.props.session, {
    37     this.props.notesActions.addNote(this.props.session, {
    37       plain: plain,
    38       plain: plain,
    38       raw: raw,
    39       raw: raw,
    39       html: html,
    40       html: html,
    40 
       
    41       startedAt: this.state.startedAt,
    41       startedAt: this.state.startedAt,
    42       finishedAt: now(),
    42       finishedAt: now(),
    43       categories: categories,
    43       categories: categories,
       
    44       marginComment: marginComment,
    44     });
    45     });
    45 
    46 
    46     this.refs.editor.clear();
    47     this.refs.editor.clear();
    47     setTimeout(() => this.refs.editor.focus(), 250);
    48     setTimeout(() => this.refs.editor.focus(), 250);
    48   }
    49   }
    72           <div className="editor-right">
    73           <div className="editor-right">
    73             <FormControl
    74             <FormControl
    74               name="margin"
    75               name="margin"
    75               componentClass="textarea"
    76               componentClass="textarea"
    76               placeholder="Enter a margin comment for your note"
    77               placeholder="Enter a margin comment for your note"
    77               inputRef={ ref => { this.description = ref; } }
    78               inputRef={ ref => { this.marginComment = ref; } }
    78             />
    79             />
    79           </div>
    80           </div>
    80         </div>
    81         </div>
    81       </Form>
    82       </Form>
    82     );
    83     );