1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2024-10-30 06:36:17 +00:00
TiddlyWiki5/editions/tw5.com/tiddlers/widgets/BrowseWidget.tid

36 lines
1.5 KiB
Plaintext
Raw Normal View History

2014-09-10 23:06:19 +00:00
caption: browse
created: 20131024141900000
modified: 20200421221304177
tags: Widgets
title: BrowseWidget
type: text/vnd.tiddlywiki
! Introduction
The browse widget displays an HTML file browser button that allows the user to choose one or more files to import. It sends a [[WidgetMessage: tm-import-tiddlers]] carrying a JSON representation of the tiddlers imported from the files up through its parents. This message is usually handled by the NavigatorWidget which adds the tiddlers to the store and updates the story to display them.
! Content and Attributes
The content of the <<.wid BrowseWidget>> widget is ignored.
|!Attribute |!Description |
|multiple |Set to "multiple" to select multiple file upload |
|deserializer |<<.from-version "5.1.15">> Optional name of deserializer to be used (by default the deserializer is derived from the file extension or type) |
|tooltip |Optional tooltip text |
2020-04-22 11:10:34 +00:00
|accept |<<.from-version "5.1.23">> Optional comma delimited [[list of file accepted extensions|https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/file#Unique_file_type_specifiers]] and/or MIME types |
|message |Optional override of widget message to be generated. The files will be passed in the JavaScript object `event.target.files` |
|param |Optional parameter to be passed with the custom message |
On iPhone/iPad choosing the multiple option will remove the ability to take photographs/videos directly into TiddlyWiki.
2014-10-06 16:38:12 +00:00
''e.g.''
```
<$browse/>
2014-10-06 16:38:12 +00:00
```
renders as:
<$browse/>
2014-10-20 15:57:06 +00:00