Javascript: How to get the text value of drop event?
<p>I wondered how to get the text value of a drop event. It seems to be an easy question but surprisingly I can't find an answer that works.</p>

<p>Demo below</p>

<pre><code>&lt;script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.0/jquery.min.js"&gt;&lt;/script&gt;
&lt;div id="dropbox" contenteditable="true" id="dropbox"&gt;
&lt;/div&gt;

&lt;style&gt;
#dropbox{
width:400px;
height:60px;
background-color: #87cefa;
}
&lt;/style&gt;

&lt;script&gt;
$('#dropbox').on('drop', function(e) {

console.log(e.dataTransfer); //first try
console.log(e.getData('Text'));  //second try

});     
&lt;/script&gt;
</code></pre>