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) {
|
function linkdrop(event) {
|
||||||
var reply = event.dataTransfer.getData("text/uri-list");
|
var reply = event.dataTransfer.getData("text/uri-list");
|
||||||
event.target.textContent = reply;
|
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
if(reply && reply.length) {
|
if(reply && reply.length) {
|
||||||
reply = bin2hex(reply);
|
reply = bin2hex(reply);
|
||||||
@ -489,6 +488,7 @@ function enableOnUser(){
|
|||||||
// cancel event and hover styling
|
// cancel event and hover styling
|
||||||
DragDropUploadFileHover(e);
|
DragDropUploadFileHover(e);
|
||||||
|
|
||||||
|
|
||||||
// fetch FileList object
|
// fetch FileList object
|
||||||
var files = e.target.files || e.originalEvent.dataTransfer.files;
|
var files = e.target.files || e.originalEvent.dataTransfer.files;
|
||||||
// process all File objects
|
// process all File objects
|
||||||
|
@ -38,7 +38,7 @@
|
|||||||
</div>
|
</div>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
<div id="jot-text-wrap">
|
<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>
|
</div>
|
||||||
{{if $attachment}}
|
{{if $attachment}}
|
||||||
<div id="jot-attachment-wrap">
|
<div id="jot-attachment-wrap">
|
||||||
|
Reference in New Issue
Block a user