added to TW-Scripts

Hi Eric,
  This is really amazing! A nice bookmark creator by drag and drop links 
for example from a web page or Google search result.
  This specially works nice when the Page dropzone is disabled.

Cheers
Mohammad

On Monday, March 16, 2020 at 12:42:39 PM UTC+3:30, 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/433e384c-57da-4b69-9456-c7078c2cea73%40googlegroups.com.

Reply via email to