client/src/components/Note.js
changeset 173 0e6703cd0968
parent 172 4b780ebbedc6
child 191 3f71ad81a5a9
equal deleted inserted replaced
172:4b780ebbedc6 173:0e6703cd0968
    23     e.stopPropagation();
    23     e.stopPropagation();
    24 
    24 
    25     this.props.onDelete();
    25     this.props.onDelete();
    26   }
    26   }
    27 
    27 
    28   onClickButton = (e) => {
    28   submitNote = () => {
    29 
    29 
    30     const plain = this.editor.asPlain();
    30     const plain = this.editor.asPlain();
    31     const raw = this.editor.asRaw();
    31     const raw = this.editor.asRaw();
    32     const html = this.editor.asHtml();
    32     const html = this.editor.asHtml();
    33     const categories = this.editor.asCategories();
    33     const categories = this.editor.asCategories();
    54   renderNoteContent() {
    54   renderNoteContent() {
    55     if (this.props.isEditing) {
    55     if (this.props.isEditing) {
    56       return (
    56       return (
    57         <div className="note-content w-100 pl-2 pt-2">
    57         <div className="note-content w-100 pl-2 pt-2">
    58           <SlateEditor editorRef={this.editorInst}
    58           <SlateEditor editorRef={this.editorInst}
    59             onButtonClick={ this.onClickButton }
    59             submitNote={ this.submitNote }
    60             note={ this.props.note }
    60             note={ this.props.note }
    61             annotationCategories={ this.props.annotationCategories } />
    61             annotationCategories={ this.props.annotationCategories } />
    62         </div>
    62         </div>
    63       )
    63       )
    64     }
    64     }