title: draftjs handle backspace deleted content
body: <p>Currently I am building a react application that use draftjs as Editor</p>
  <p>Particularly, I added a pasted image feature with the usage of onPastedFilesChange attributes and AtomicBlockUtils.insertAtomicBlock methods.</p>
  <p>User can paste image into Editor and meanwhile the image is uploaded to file server.</p>
  <p>But currently, I faced a problem. When user enter <strong>backspace key</strong> to delete the pasted image. I need to delete the image on the server.</p>
  <p><strong>So I need to know which content is deleted when user enter the backspace key.</strong></p>
  <p>I can capture the event by handleKeyCommand attributor, but I don't know how to catch the content deleted by entering backspace key.</p>
  <p>Does anybody know how to capture the deleted content caused by backspace key?</p>
  <p>Thank you so much</p>
  <pre><code>   &lt;Editor
        handlePastedFiles={(e) =&gt; {
         onPastedFilesChange(e).then()
         return 'handled'
        }}
        handleKeyCommand={handleKeyCommand}
     /&gt;
  
  
    const onPastedFilesChange = async (blobs: Blob[]) =&gt; {
        ....uploading blob to server....
        const currentContent = editorState.getCurrentContent()
        const entity = currentContent.createEntity(
          PastedImageEntityType,
          'IMMUTABLE',
          {
            src: `uploaded blob file url`,
            id: id,
          }
        )
        const newState = EditorState.set(editorState, {
          currentContent: entity,
        })
  
        const entityKey = entity.getLastCreatedEntityKey()
        setEditorState(
          AtomicBlockUtils.insertAtomicBlock(newState, entityKey, ' ')
        )
  
    }
  
    const handleKeyCommand = (command: string): DraftHandleValue =&gt; {
     
      if (command === 'backspace') {
        //ToDo remove uploaded image, we need to know the deleted content here
      }
  
      return 'not-handled'
    }
  
  
  </code></pre>