linkding
linkding copied to clipboard
Drag and Drop a link to the Linkding tab creates a bookmark
To save a bookmark to Linkding, drag and drop the link to the Linkding tab this automatically
creates a bookmark
I don't think this is possible. Do you know of any website that works like that?
Dragging a link onto an open linkding page might be possible, but that would require you to have both windows open at once.
Saw this issue and thought it sounds interesting. Just tried it real quick and found out what you could do is just having a linkding tab open and by hovering over it (with your link dragged) you could switch to that tab. Which then allows you to drop it on linkding.
https://github.com/sissbruecker/linkding/assets/110255203/8db9c6d0-b7ca-493e-acbe-8dd7f1451ae1
that's the demo code I used:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8"/>
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
<title>linkding drag & drop</title>
<style>
*{
padding: 0;
margin: 0;
box-sizing: border-box;
}
html, body{
height: 100%;
}
body{
padding: 2em;
}
main{
border: 4px solid red;
background-color: #ddd;
height: 100%;
}
</style>
</head>
<body>
<main ondrop="dropHandler(event)" ondragover="dragOverHandler(event)"></main>
<script>
function dropHandler(e){
e.preventDefault();
if(e.dataTransfer.items){
[...e.dataTransfer.items].forEach((item, i) =>{
item.getAsString((s) =>{
console.log(s);
});
});
// could have instead used (to just get one string):
// console.log(e.dataTransfer.getData("text"));
}
}
function dragOverHandler(e){
e.preventDefault();
}
</script>
</body>
</html>
Might be a cool feature, not sure if it would be used a lot tho. At the moment, if your linkding tab is on "Add bookmark" you could already drop it into the URL text input.
Seems niche and hard to discover indeed. Also not really more convenient than the browser extension or the bookmarklet. No plans to do this I'm afraid.