Fixed: Checklist items cant be created from shortcuts

Fixed: BlockToolbar not close on unfocus
This commit is contained in:
Tom Moor
2017-12-05 20:05:43 -08:00
parent 751b468e92
commit e3f664e8a4
14 changed files with 105 additions and 90 deletions

View File

@@ -46,7 +46,6 @@ class MarkdownEditor extends Component {
this.renderNode = createRenderNode({
onInsertImage: this.insertImageFile,
onChange: this.onChange,
});
this.plugins = createPlugins({
onImageUploadStart: props.onImageUploadStart,
@@ -76,6 +75,7 @@ class MarkdownEditor extends Component {
}
onChange = (change: Change) => {
// TODO: Lets avoid constantly serializing to Markdown
if (this.editorValue !== change.value) {
this.props.onChange(Markdown.serialize(change.value));
this.editorValue = change.value;
@@ -99,7 +99,7 @@ class MarkdownEditor extends Component {
}
};
insertImageFile = async (file: window.File) => {
insertImageFile = (file: window.File) => {
this.editor.change(change =>
change.call(
insertImageFile,