Fixes: Image upload. Back to using our own plugin to show progress

This commit is contained in:
Tom Moor
2017-12-06 08:15:06 -08:00
parent 30b2b91bbc
commit 64c2624479
5 changed files with 41 additions and 23 deletions

View File

@ -1,5 +1,5 @@
// @flow
import InsertImages from 'slate-drop-or-paste-images';
import InsertImages from '@tommoor/slate-drop-or-paste-images';
import PasteLinkify from 'slate-paste-linkify';
import CollapseOnEscape from 'slate-collapse-on-escape';
import TrailingBlock from 'slate-trailing-block';
@ -25,10 +25,11 @@ const createPlugins = ({ onImageUploadStart, onImageUploadStop }: Options) => {
}),
InsertImages({
extensions: ['png', 'jpg', 'gif', 'webp'],
insertImage: (change, file) => {
insertImage: async (change, file, editor) => {
return change.call(
insertImageFile,
file,
editor,
onImageUploadStart,
onImageUploadStop
);