mirror of
https://github.com/zadam/trilium.git
synced 2025-06-06 18:08:33 +02:00
added drag & drop files on note detail
This commit is contained in:
parent
8b3e721028
commit
5b251b9977
@ -18,6 +18,7 @@ import noteDetailRelationMap from './note_detail_relation_map.js';
|
|||||||
import bundleService from "./bundle.js";
|
import bundleService from "./bundle.js";
|
||||||
import attributeService from "./attributes.js";
|
import attributeService from "./attributes.js";
|
||||||
import utils from "./utils.js";
|
import utils from "./utils.js";
|
||||||
|
import importDialog from "../dialogs/import.js";
|
||||||
|
|
||||||
const $noteTitle = $("#note-title");
|
const $noteTitle = $("#note-title");
|
||||||
|
|
||||||
@ -330,6 +331,20 @@ messagingService.subscribeToSyncMessages(syncData => {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
$noteDetailWrapper.on("dragover", e => e.preventDefault());
|
||||||
|
|
||||||
|
$noteDetailWrapper.on("dragleave", e => e.preventDefault());
|
||||||
|
|
||||||
|
$noteDetailWrapper.on("drop", e => {
|
||||||
|
importDialog.uploadFiles(getCurrentNoteId(), e.originalEvent.dataTransfer.files, {
|
||||||
|
safeImport: true,
|
||||||
|
shrinkImages: true,
|
||||||
|
textImportedAsText: true,
|
||||||
|
codeImportedAsCode: true,
|
||||||
|
explodeArchives: true
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
$(document).ready(() => {
|
$(document).ready(() => {
|
||||||
$noteTitle.on('input', () => {
|
$noteTitle.on('input', () => {
|
||||||
noteChanged();
|
noteChanged();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user