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:
parent
ec3ca11d0d
commit
12162f53b4
@ -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
|
||||
|
@ -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">
|
||||
|
Reference in New Issue
Block a user