kopia lustrzana https://github.com/miklobit/TiddlyWiki5
Fix link dragging to text editors
We were just adding double square brackets if the title contains spaces. We should be adding them if the title is not a valid wikilink.print-window-tiddler
rodzic
1600beb193
commit
962cdf500a
|
@ -155,7 +155,7 @@ LinkWidget.prototype.handleDragStartEvent = function(event) {
|
|||
dataTransfer.clearData();
|
||||
var jsonData = this.wiki.getTiddlerAsJson(this.to),
|
||||
textData = this.wiki.getTiddlerText(this.to,""),
|
||||
title = this.to.indexOf(" ") === -1 ? this.to : "[[" + this.to + "]]";
|
||||
title = (new RegExp("^" + $tw.config.textPrimitives.wikiLink + "$","mg")).exec(this.to) ? this.to : "[[" + this.to + "]]";
|
||||
// IE doesn't like these content types
|
||||
if(!$tw.browser.isIE) {
|
||||
dataTransfer.setData("text/vnd.tiddler",jsonData);
|
||||
|
|
Ładowanie…
Reference in New Issue