slate-plugins icon indicating copy to clipboard operation
slate-plugins copied to clipboard

Wrong handler onInsertText in slate-drop-or-paste-images

Open beautyfree opened this issue 6 years ago • 0 comments

What's the current behavior?

Wrong handler onInsertText in slate-drop-or-paste-images

In code we have call:

  asyncApplyChange(c, editor, file)

But the method accepts only such variables:

  function asyncApplyChange(change, file) {
    const { editor } = change

    return Promise.resolve(insertImage(change, file)).then(() => {
      editor.onChange(change)
    })
  }

So we need to remove editor from arguments, because we have it in change

beautyfree avatar Apr 09 '19 09:04 beautyfree