Many thanks Eric! I will go through it and try to use in my case and then come back with my results!
Actually I am working on the favorites plugin and I am trying to create favorites folder but I don not want to use a lot of tags! So, I am working with list field and a folder tiddler! Cheers Mohammad On Friday, December 20, 2019 at 12:04:22 AM UTC+3:30, Eric Shulman wrote: > > On Thursday, December 19, 2019 at 11:48:41 AM UTC-8, Mohammad wrote: >> >> Summary: >> How to drag and drop a tiddler from one droppable area to another >> droppable area >> where the action tiddler removed from list field of tiddler 1 and added >> to list field of tiddler 2 >> > > I just recently wrote something similar for the custom TOC macro I use in > InsideTiddlyWiki. > > Here's a link to my code: > http://tiddlytools.com/InsideTW/#TiddlyTools%2FTOC%2FMacros > > and here's an excerpt showing the relevant handling: > \define toc-item-drop() > <!-- get OLDTAG and NEWTAG, exclude special tags --> > <$vars sourcetags={{{ [<actionTiddler>get[tags]] }}} > targettags={{{ [<item>get[tags]] }}}> > <$vars oldtag={{{ [enlist<sourcetags>!enlist<toc-ignore-tags>] }}} > newtag={{{ [enlist<targettags>!enlist<toc-ignore-tags>] }}}> > <$reveal default=<<modifier>> type="match" text="normal"> <!-- DROP AS > SIBLING --> > <$action-listops $tiddler=<<actionTiddler>> $field="tags" $subfilter= > "-[<oldtag>]" /> > <$action-listops $tiddler=<<actionTiddler>> $field="tags" $subfilter= > "[<newtag>]" /> > <$action-listops $tiddler=<<oldtag>> $field="list" $subfilter= > "-[<actionTiddler>]" /> > <$action-listops $tiddler=<<newtag>> $field="list" $subfilter= > "+[insertbefore:item<actionTiddler>]" /> > </$reveal> > <$reveal default=<<modifier>> type="match" text="shift"> <!-- DROP AS > CHILD --> > <$action-listops $tiddler=<<actionTiddler>> $field="tags" > $subfilter="-[<oldtag>]" /> > <$action-listops $tiddler=<<actionTiddler>> $field="tags" $subfilter= > "[<item>]" /> > <$action-listops $tiddler=<<oldtag>> $field="list" $subfilter= > "-[<actionTiddler>]" /> > <$action-listops $tiddler=<<item>> $field="list" $subfilter= > "[<actionTiddler>]" /> > </$reveal> > </$vars> > </$vars> > \end > > Note that I am manipulating both "tags" and "list" fields (the TOC uses > entries in the "tags" field to define a tiddler (the "actionTiddler") as a > "child" of a specific "branch" (the "item") of the tree, and the branch > itself uses the "list" field to set the order of display for it's > "children"). Also notice that I have different handling for "shift-drop" > vs. regular "drop". > > While this isn't exactly what you are trying to do, perhaps it will give > you some clues that help you find the right direction... > > 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 [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/70ca91e5-a7df-42bb-8c6a-4a4b3964a5e7%40googlegroups.com.

