Agreed, really good implementation. Mahalo (thanks)! On Monday, March 16, 2020 at 2:12:39 AM UTC-7, Eric Shulman wrote: > > On Monday, March 16, 2020 at 12:52:59 AM UTC-7, Mohammad wrote: >> >> >> This is a nice idea! I will look how we can have customized drop zone! >> Like dragging a link from other browser tab, one can quickly create a >> bookmark to that page/link somehow a tiddlyclip effect. >> > > The <$dropzone> widget is intended for triggering an "import" handler. As > noted in the documentation: > > *It sends a WidgetMessage: tm-import-tiddlers carrying a JSON > representation of the tiddlers to be imported up through its parents.* > > To implement general purpose drag-and-drop handling, use the <$droppable> > widget. > > When something is dropped onto the <$droppable> widget, it automatically > sets the <<actionTiddler>> variable to contain the value of what was > dropped. While this is typically used to handle dropping of tiddler titles > within a TW document it also works if you drag a link or text from any > non-TW browser tab. The result is that the <<actionTiddler>> value will be > the link (or text) that was dragged from the other browser tab. It is then > up to you to define the desired actions="..." parameter for the > <$droppable> widget to do what you want with the <<actionTiddler>> value > you receive. Thus, something like this might be used to create a new > "bookmark" tiddler containing a dropped link: > > \define make_bookmark() <$action-createtiddler $basetitle="Bookmark" text > =<<actionTiddler>> /> > <$droppable actions=<<make_bookmark>>> DROP HERE </$droppable> > > enjoy, > -e > >
-- 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+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/6e2bf9b0-87a7-479c-a912-b9a6b6ea298d%40googlegroups.com.