2014-09-10 23:06:19 +00:00
caption: edit
2020-11-30 18:48:04 +00:00
created: 20131024141900000
2024-06-29 12:23:30 +00:00
modified: 20240627220419761
2021-11-01 12:56:52 +00:00
tags: Widgets TriggeringWidgets
2020-11-30 18:48:04 +00:00
title: EditWidget
type: text/vnd.tiddlywiki
2013-10-31 22:03:40 +00:00
! Introduction
The edit widget provides a general purpose interface for editing a tiddler. It dynamically chooses the appropriate widget depending on the type of the tiddler (currently either the EditTextWidget or the EditBitmapWidget).
! Content and Attributes
The content of the `<$edit>` widget is ignored.
|!Attribute |!Description |
2015-02-24 16:41:16 +00:00
|tiddler |The tiddler to edit (defaults to the [[current tiddler|Current Tiddler]]) |
2013-10-31 22:03:40 +00:00
|field |The field to edit (defaults to `text`). Takes precedence over the `index` attribute |
|index |The index to edit |
|class |A CSS class to be added the generated editing widget |
2019-03-09 17:45:59 +00:00
|tabindex |Sets the `tabindex` attribute of the input or textarea to the given value |
2020-11-30 18:48:04 +00:00
|autocomplete |<<.from-version 5.1.23>> An optional string to provide a hint to the browser how to handle autocomplete for this input |
2020-06-11 10:41:35 +00:00
|cancelPopups |<<.from-version "5.1.23">> if set to "yes", cancels all popups when the input gets focus |
2020-07-13 16:42:55 +00:00
|inputActions |<<.from-version 5.1.23>> Optional actions that are triggered every time an input event occurs within the input field or textarea |
|refreshTitle |<<.from-version 5.1.23>> An optional tiddler title that makes the input field update whenever the specified tiddler changes |
2024-06-29 12:23:30 +00:00
! Examples
!! Edit the contents (text field) of a tiddler titled <%if [<now YYYY-0MM-0DD>is[tiddler]] %> <$tiddler tiddler=<<now YYYY-0MM-0DD>> > <$link/></$tiddler> <%else %> with today’ s date <% endif %>
<$macrocall $name=".example" n="1"
eg="""<$edit tiddler=<<now YYYY-0MM-0DD>> class="tc-edit-texteditor"/>
"""/>
!! Edit $:/status/UserName with single-line input box, have browser offer autocomplete for email
<$macrocall $name=".example" n="2"
eg="""<$edit-text tiddler="$:/status/UserName" tag="input" size=40 autocomplete="email"/>
"""/>