Thanks Eric,

Here is my resulting popup drop on field.

Works on Tiddlywiki.com

\define dropActions()
<$action-setfield $tiddler=<<currentTiddler>> $field="link" 
$value=<<actionTiddler>>/>
\end
<$button popup=<<qualify "$:/state/popup/myPopup">>> Open dropzone</$button>
<$reveal state=<<qualify "$:/state/popup/myPopup">> type="popup" 
position="belowright">
   <div class="tc-drop-down" style="transform:translate(0,calc(-50% - 
1em));">
      <$droppable tag="div" actions=<<dropActions>>>
          Drop tiddler or link here {{!!link}}
     </$droppable>
   </div>
</$reveal>

Thanks heaps.

On Thursday, 29 July 2021 at 13:21:06 UTC+10 Eric Shulman wrote:

> On Wednesday, July 28, 2021 at 5:27:25 PM UTC-7 TW Tones wrote:
>
>> Have you ever made a popup also a dropzone?
>> I would like a popup that has a number of coloured boxes that represent 
>> fields I can drop content into. eg a link
>>
>
> It's actually quite straightforward.  Try this:
> \define dropActions()
> <$action-createtiddler $basetitle=<<actionTiddler>>
>    tags={{{ [<actionTiddler>get[tags]] }}}
>    text={{{ [<actionTiddler>get[text]] }}}/>
> \end
> <$button popup=<<qualify "$:/state/popup/myPopup">>> CLICK ME! </$button>
> <$reveal state=<<qualify "$:/state/popup/myPopup">> type="popup" 
> position="belowright">
>    <div class="tc-drop-down" style="transform:translate(0,calc(-50% - 
> 1em));">
>       <$droppable tag="div" actions=<<dropActions>>>
>       POPUP CONTENT HERE
>       <p/>
>       SOME MORE CONTENT
>       <p/>
>       ETC.
>      </$droppable>
>    </div>
> </$reveal
>
> Notes:
> * The $droppable widget uses tag="div" so that the entire background of 
> the popup is the drop target
> * For this example, dropActions() creates a new tiddler with "TiddlerTitle 
> (n)" that copies the tags and text fields.
>
> 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/bb6a1431-1e26-49a1-8f29-0dd838dfab53n%40googlegroups.com.

Reply via email to