mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2024-11-27 12:07:19 +00:00
Use titles when dragging links to non-TiddlyWiki destinations
Handily, this means that you can drag tiddler links from the sidebar into the text editor, making it easier to create links and transclusions.
This commit is contained in:
parent
b052e8f50b
commit
53d834c86b
@ -158,11 +158,11 @@ LinkWidget.prototype.handleDragStartEvent = function(event) {
|
|||||||
// IE doesn't like these content types
|
// IE doesn't like these content types
|
||||||
if(!$tw.browser.isIE) {
|
if(!$tw.browser.isIE) {
|
||||||
dataTransfer.setData("text/vnd.tiddler",jsonData);
|
dataTransfer.setData("text/vnd.tiddler",jsonData);
|
||||||
dataTransfer.setData("text/plain",textData);
|
dataTransfer.setData("text/plain",this.to);
|
||||||
dataTransfer.setData("text/x-moz-url","data:text/vnd.tiddler," + encodeURI(jsonData));
|
dataTransfer.setData("text/x-moz-url","data:text/vnd.tiddler," + encodeURI(jsonData));
|
||||||
}
|
}
|
||||||
dataTransfer.setData("URL","data:text/vnd.tiddler," + encodeURI(jsonData));
|
dataTransfer.setData("URL","data:text/vnd.tiddler," + encodeURI(jsonData));
|
||||||
dataTransfer.setData("Text",textData);
|
dataTransfer.setData("Text",this.to);
|
||||||
event.stopPropagation();
|
event.stopPropagation();
|
||||||
} else {
|
} else {
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
|
Loading…
Reference in New Issue
Block a user