How to get both the text + images copied in clipboard
<p>I am using MS-WORD for copying content to a rich editor. 
I need to use both the text + images which were copied from a MS-WORD file (via CTRL+A) into the editor (via CTRL+V).</p>

<p>In order to achieve that I am using this code:</p>

<pre><code>    function handlePaste (e) {
        var clipboardData, pastedData;

        // Stop data actually being pasted into div
        e.stopPropagation();
    e.preventDefault();

        // Get pasted data via clipboard API
    clipboardData = e.clipboardData || window.clipboardData;

    pastedData = clipboardData.getData('Text');

    // Do whatever with pasteddata
    alert(pastedData);
}

document.getElementById('editableDiv').addEventListener('paste', handlePaste);
</code></pre>

<p>The issue with this code is that I am getting only the text from clipboard.
Here is the screenshot:</p>

<p><a href="https://i.stack.imgur.com/tEtzD.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/tEtzD.png" alt="enter image description here"></a></p>

<p>as you can see I am getting just text copied from word file and not the images.</p>

<p>Is there any solution on capturing images too along with text present in clipboard.</p>

<p>Right now I am using Chrome to check that functionality.</p>

<p>Here is the JSFiddle for the same:</p>

<p><a href="https://jsfiddle.net/swL8ftLs/247/" rel="nofollow noreferrer">https://jsfiddle.net/swL8ftLs/247/</a></p>