I have a TW in folder "Wiki" and an image in "Wiki/images/". Could we make is so that when we drag and drop the image "Wiki/images/bunnies.jpg" into a text area TW checks that the file is within its folder (in this case in "Wiki") and if it is have the relative link text [[file:./Wiki/images/bunnies.jpg]] show up and if it not have the absolute link text show up [[file:/C:/Users/Me/Wiki/images/bunnies.jpg]]
--
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 tiddlywiki+...@googlegroups.com.
To post to this group, send email to tiddl...@googlegroups.com.
Visit this group at http://groups.google.com/group/tiddlywiki.
For more options, visit https://groups.google.com/d/optout.
It is possible to open a file browser in a firefox tab and then drag/drop file names from there. However, they are imported as "untitled" tiddlers and have to be massaged into usable links. Obviously, FF does allow access to the file path name when dragging from another FF tab. So a good compromise solution to my way of thinking would be if TW could turn those drag/drops into usable file or image links.
Mark
On Tuesday, November 4, 2014 10:26:56 PM UTC-8, Blake Blacksmith wrote:Instead of drag and drop being limited to full binary imports of a file(which bloats the Wiki and makes editing files cumbersome) is there a way to drag and drop a file that is within a TiddlyWiki's folder and have it expressed as a local file link?For clarity here is an example:I have a TW in folder "Wiki" and an image in "Wiki/images/". Could we make is so that when we drag and drop the image "Wiki/images/bunnies.jpg" into a text area TW checks that the file is within its folder (in this case in "Wiki") and if it is have the relative link text [[file:./Wiki/images/bunnies.jpg]] show up and if it not have the absolute link text show up [[file:/C:/Users/Me/Wiki/images/bunnies.jpg]]Right now I am manually inserting relative links but this is very time consuming when I must link many files into a Tiddlers text. I currently do not have the time to make my own plugin that does this but think such a plugin would extend the use-cases of TW to in-the-field/real time note taking.
--
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 tiddlywiki+...@googlegroups.com.
To post to this group, send email to tiddl...@googlegroups.com.
Visit this group at http://groups.google.com/group/tiddlywiki.
For more options, visit https://groups.google.com/d/optout.
file:///d:/data/Proj/PhotoScrapbook/origs/%7B040%7DIM-3837.jpg
So, there's more there than just a file name. The "file:///" should provide a clue that this is a file (not ordinary text) and the suffix indicates that it is an image.
Thanks!
Mark
I'm assuming (perhaps incorrectly) that when you drag/drop a link from a FF link (not from Windows explorer) that FF exposes more information.
Here's what shows up after a drag/drop/import sequence from a Firefox tab being used as a local file browser:
We could indeed introduce special behaviour for dragging links; the browser identifies the text as a link when it is dropped. The problem is that it's not clear what that behaviour should be; for image links, ...
--
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 tiddlywiki+...@googlegroups.com.
To post to this group, send email to tiddl...@googlegroups.com.
Visit this group at http://groups.google.com/group/tiddlywiki.
For more options, visit https://groups.google.com/d/optout.
One point to note is that you'll get different behaviour if you drag the link into the text editor within a tiddler you are editing ... We could indeed tweak it to be a relative link if possible.
--
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 tiddlywiki+...@googlegroups.com.
Sorry if I was unclear but I do not support the idea of importing files directly into an html file such as TiddlyWiki since this will cause slow down and a loss of file mobility.
My request for a link import was based on linking to relative files and folders.One point to note is that you'll get different behaviour if you drag the link into the text editor within a tiddler you are editing ... We could indeed tweak it to be a relative link if possible.I think this would vastly improve the process of including files in TW.
By the way, when I drag a file into the text region of a Tiddler during editing I get redirected by my browser to the file (using most recent Chrome on Win 8) so I do not get the absolute link you mentioned.
To me, what would make sense is that when you drop an external local image file (jpg,png,gif,,etc.) into TW it would create an image link to that file, preferably with a relative address. I would not require TW to verify that the contents of the file are really image data.
Dragging or dropping into an open tiddler would append the img or ext link to the bottom (or to the cursor location if possible).
--
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 tiddlywiki+...@googlegroups.com.
To post to this group, send email to tiddl...@googlegroups.com.
Visit this group at http://groups.google.com/group/tiddlywiki.
For more options, visit https://groups.google.com/d/optout.
Sorry, forgot to add that I was talking about dragging the links from a FF tab being used as a local file browser. I believe (but could be mistaken) that this circumnavigates the missing path information problem.
If the browser, under those situations, passes the link, doesn't it also pass the extension? So the file type could be determined with 90% accuracy based on the extension?
\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.
I don't quite understand why you think that embedding a file into TW causes a loss of mobility? I think that one of the advantages of embedding is that it makes it easier to move the TW file around, without worrying about dependent files.
Yes, dragging a file behaves differently. It's dragging a link from the browser into a text editor that has the behaviour I described.
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).
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.
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 tiddlywiki+...@googlegroups.com.
To post to this group, send email to tiddl...@googlegroups.com.
Visit this group at http://groups.google.com/group/tiddlywiki.
For more options, visit https://groups.google.com/d/optout.
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.
--
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 tiddlywiki+...@googlegroups.com.
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)?
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
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.