You can drag links to the editor (which will be parsed and inserted); as well as files (which will be uploaded)

This commit is contained in:
redmatrix 2016-08-09 18:13:54 -07:00
parent ec3ca11d0d
commit 12162f53b4
2 changed files with 2 additions and 2 deletions

View file

@ -268,7 +268,6 @@ function enableOnUser(){
function linkdrop(event) {
var reply = event.dataTransfer.getData("text/uri-list");
event.target.textContent = reply;
event.preventDefault();
if(reply && reply.length) {
reply = bin2hex(reply);
@ -489,6 +488,7 @@ function enableOnUser(){
// cancel event and hover styling
DragDropUploadFileHover(e);
// fetch FileList object
var files = e.target.files || e.originalEvent.dataTransfer.files;
// process all File objects

View file

@ -38,7 +38,7 @@
</div>
{{/if}}
<div id="jot-text-wrap">
<textarea class="profile-jot-text" id="profile-jot-text" name="body" tabindex=2 placeholder="{{$share}}">{{$content}}</textarea>
<textarea class="profile-jot-text" id="profile-jot-text" name="body" tabindex=2 placeholder="{{$share}}" ondragenter="linkdropper(event);" ondragover="linkdropper(event);" ondrop="linkdrop(event);" >{{$content}}</textarea>
</div>
{{if $attachment}}
<div id="jot-attachment-wrap">