Would that make sense/be possible to, when drag and dropping a non-text file (a pdf, an image, etc.) to a tiddler that is currently being edited, have an option for copying the content of the file to e.g. ./media/data/whatever.xyz, and only inserting a link within the tiddler? Would be very useful. Thanks! Martin
On Saturday, November 8, 2014 at 1:07:16 PM UTC+1, Blake Blacksmith wrote: > > Ok. Thats unfortunate but I appreciate your effort. For now I'll stick to > dragging and dropping the absolute path from my file explorer. > > Thanks for your continued great work with TW5! > > > > On Sat, Nov 8, 2014 at 3:51 AM, Jeremy Ruston <[email protected] > <javascript:>> wrote: > >> Hi Blake >> >> Is it possible to have TiddlyWiki have an active drag and drop region in >>> the edit-text window that will prevent the browser from opening the file >>> and instead paste the files relative path(or absolute path is unavailable)? >>> >> >> I've done some more tests with dragging a file from Finder/Explorer into >> a text editor in the TiddlyWiki browser window. The default handling on >> Chrome is to navigate to the incoming file. We can prevent that navigation, >> but we still can't access the path of the file, and so we can't paste the >> relative path of the file. >> >> Best wishes >> >> Jeremy. >> >> >> >>> >>> On Fri, Nov 7, 2014 at 2:13 PM, Jeremy Ruston <[email protected] >>> <javascript:>> wrote: >>> >>>> Hi Mark >>>> >>>> My quick test on a Chrome browser suggests that links dragged from a >>>>> Chrome tab used as a file browser also may contain the full file path >>>>> name. >>>>> To me, dragging from a browser tab would be the most universal way of >>>>> doing >>>>> things, since a plugin would have to be specific not only to the browser >>>>> but also the operating system (it's likely that Linux and Mac are going >>>>> to >>>>> present link drag/drops differently than Win OS). >>>>> >>>> >>>> You may have convinced me. I'd forgotten that other browsers also >>>> provide a directory viewer for file: URIs (I nearly missed it on Chrome >>>> because it doesn't actually let you drag a folder onto the Chrome icon or >>>> window). >>>> >>>> I've created a ticket here: >>>> >>>> https://github.com/Jermolene/TiddlyWiki5/issues/1067 >>>> >>>> >>>> >>>>> On the old TW, with the Javscript plugin, I would probably just have >>>>> written a routine that grabbed a list of files and created a tiddler for >>>>> each one containing a link of the right type pointing to a local relative >>>>> path. I'm finding it harder to get into coding in TW5. >>>>> >>>> >>>> There's a lot more code in TW5, and it can be hard to track down where >>>> things are done. In this case, the area of interest is here: >>>> >>>> >>>> https://github.com/Jermolene/TiddlyWiki5/blob/master/core%2Fmodules%2Fwidgets%2Fdropzone.js#L87 >>>> >>>> > On a related note, I recently tried dragging a file into TiddlyWiki's >>>> text editor on a Mac+Safari and the file-path was inserted as desired. >>>> This >>>> is unlike in Windows with Chrome, Firefox, or Safari where the dragged >>>> file >>>> redirects the web-page to the dragged file. >>>> >>>> Do you mean dragging from Finder or from Safari's file browser? I see >>>> the same behaviour of navigating to the file when dragging a file from >>>> Finder to Chrome on OS X. I haven't explored whether dragging a file into >>>> TiddlyWiki's text editor can be made to consistently insert the path, I'll >>>> investigate. >>>> >>>> Best wishes >>>> >>>> Jeremy. >>>> >>>> >>>> >>>> >>>>> >>>>> Thanks! >>>>> Mark >>>>> >>>>> On Friday, November 7, 2014 8:36:20 AM UTC-8, Jeremy Ruston wrote: >>>>>> >>>>>> \Ah, OK, yes, in that case the browser exposes an URL link as text, >>>>>> and so we could do the global-to-local transformation etc. The trouble >>>>>> is >>>>>> that I'm not sure that it's worth it, given that it would only work with >>>>>> the Firefox file browser. I think it would be more useful to spend the >>>>>> effort on getting TiddlyFox/TiddlyClip to make it possible to drag files >>>>>> from the OS Finder/Explorer and get a relative link made automatically. >>>>>> >>>>>> >>>>>> -- >>>>> You received this message because you are subscribed to the Google >>>>> Groups "TiddlyWiki" group. >>>>> To unsubscribe from this group and stop receiving emails from it, send >>>>> an email to [email protected] <javascript:>. >>>>> To post to this group, send email to [email protected] >>>>> <javascript:>. >>>>> Visit this group at http://groups.google.com/group/tiddlywiki. >>>>> For more options, visit https://groups.google.com/d/optout. >>>>> >>>> >>>> >>>> >>>> -- >>>> Jeremy Ruston >>>> mailto:[email protected] <javascript:> >>>> >>>> -- >>>> You received this message because you are subscribed to a topic in the >>>> Google Groups "TiddlyWiki" group. >>>> To unsubscribe from this topic, visit >>>> https://groups.google.com/d/topic/tiddlywiki/k-cMEGkOV-8/unsubscribe. >>>> To unsubscribe from this group and all its topics, send an email to >>>> [email protected] <javascript:>. >>>> To post to this group, send email to [email protected] >>>> <javascript:>. >>>> Visit this group at http://groups.google.com/group/tiddlywiki. >>>> For more options, visit https://groups.google.com/d/optout. >>>> >>> >>> -- >>> You received this message because you are subscribed to the Google >>> Groups "TiddlyWiki" group. >>> To unsubscribe from this group and stop receiving emails from it, send >>> an email to [email protected] <javascript:>. >>> To post to this group, send email to [email protected] >>> <javascript:>. >>> Visit this group at http://groups.google.com/group/tiddlywiki. >>> For more options, visit https://groups.google.com/d/optout. >>> >> >> >> >> -- >> Jeremy Ruston >> mailto:[email protected] <javascript:> >> >> -- >> You received this message because you are subscribed to a topic in the >> Google Groups "TiddlyWiki" group. >> To unsubscribe from this topic, visit >> https://groups.google.com/d/topic/tiddlywiki/k-cMEGkOV-8/unsubscribe. >> To unsubscribe from this group and all its topics, send an email to >> [email protected] <javascript:>. >> To post to this group, send email to [email protected] >> <javascript:>. >> Visit this group at http://groups.google.com/group/tiddlywiki. >> For more options, visit https://groups.google.com/d/optout. >> > > -- You received this message because you are subscribed to the Google Groups "TiddlyWiki" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/tiddlywiki. To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/cb888f77-ec90-4ea6-9693-ff806cf8ce4e%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.

