The `$dropzone` widget used to trigger drag-and-drop $:/Import handling is 
defined in `$:/core/ui/PageTemplate`:
```
<$dropzone enable=<<tv-enable-drag-and-drop>>>
```
which also defines the `tv-enable-drag-and-drop` variable, which gets it's 
value from the contents of `$:/config/DragAndDrop/Enable`, and has a 
default value of "yes".  To disable the default $dropzone, create a tiddler 
named `$:/config/DragAndDrop/Enable`, with a text field value of "no".  
After doing this, you will no longer be able to use drag-and-drop to import 
tiddlers.  You will still be able to use the "Import" PageToolbar button 
(see the sidebar "Tools" tab, or `$:/ControlPanel > Appearance > Toolbars > 
Page Toolbar` settings) to initiate a "browse for file" system dialog to 
import tiddlers from locally saved .JSON files.

You can define your own custom dropzone "hotspot" by creating a tiddler 
containing something like `<$dropzone>drop here to import 
tiddlers</$dropzone>`.  When that tiddler is displayed, you can then 
drag-and-drop onto the "drop here to import tiddlers" text to initiate the 
TWCore's usual $:/Import handling.  To add a nice visible "import tiddlers" 
$button interface into the SideBar, try this:
* Create a tiddler (e.g., SidebarImportZone)
* Enter text content: `<$dropzone><$button>drop here to import 
tiddlers</$button></$dropzone>`
* Tag it with `$:/tags/SideBarSegment`
* Add a field named 'list-before' with a value of 
`$:/core/ui/SideBarSegments/tabs`

Important note: Setting `$:/config/DragAndDrop/Enable` to "no" also 
disables use of drag-and-drop for re-ordering items within tag dropdowns.  
To avoid this side-effect, instead of setting 
`$:/config/DragAndDrop/Enable` to "no", you can disable the drag-and-drop 
$:/Import handling by editing the `$:/core/ui/PageTemplate` shadow tiddler 
and completely removing the `<$dropzone ...>` and `</$dropzone>` widgets 
from that tiddler.  This leaves the tag dropdown handling intact, while 
still preventing page-wide drag-and-drop $:/Import handling from being 
triggered.

enjoy,
-e

On Sunday, May 28, 2023 at 8:56:37 AM UTC-7 cj.v...@gmail.com wrote:

> https://youtu.be/-UNSlUzdAY8
>

-- 
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/4b549298-2a36-411a-b51b-328bcb9890c5n%40googlegroups.com.

Reply via email to