diff -r 49c5ea36d0a4 -r 772b73e31069 client/src/components/SlateEditor.js --- a/client/src/components/SlateEditor.js Thu Jun 22 12:37:53 2017 +0200 +++ b/client/src/components/SlateEditor.js Fri Jun 23 10:16:49 2017 +0200 @@ -77,7 +77,7 @@ plugins.push(annotationPlugin); this.state = { - state: Plain.deserialize(''), + state: props.note ? Raw.deserialize(props.note.raw) : Plain.deserialize(''), startedAt: null, finishedAt: null, currentSelectionText: '', @@ -420,18 +420,31 @@ {this.renderBlockButton('numbered-list', 'format_list_numbered')} {this.renderBlockButton('bulleted-list', 'format_list_bulleted')} -
-
- -
- -
+ + {this.renderToolbarButtons()} ) } + renderToolbarButtons = () => { + if (!this.props.withButtons) { + return ( +
+ ) + } + + return ( +
+
+ +
+ +
+ ); + } + /** * Render a mark-toggling toolbar button. *