diff --git a/core/ui/EditTemplate.tid b/core/ui/EditTemplate.tid index 480a28658..58852067a 100644 --- a/core/ui/EditTemplate.tid +++ b/core/ui/EditTemplate.tid @@ -5,7 +5,7 @@ title: $:/core/ui/EditTemplate \define save-tiddler-actions() \whitespace trim <$action-sendmessage $message="tm-add-tag" $param={{{ [get[text]] }}}/> -<$action-sendmessage $message="tm-add-field" $name={{{ [get[text]] }}} $value={{{ [get[text]] }}}/> +<$action-sendmessage $message="tm-add-field" $name={{{ [get[text]] }}} $value={{{ [get[text]] :map[get] }}}/> <> <$action-sendmessage $message="tm-save-tiddler"/> \end diff --git a/core/ui/EditTemplate/fieldEditor-default.tid b/core/ui/EditTemplate/fieldEditor-default.tid index 3af55027f..f3242657d 100644 --- a/core/ui/EditTemplate/fieldEditor-default.tid +++ b/core/ui/EditTemplate/fieldEditor-default.tid @@ -1,3 +1,3 @@ title: $:/core/ui/EditTemplate/fieldEditor/default -<$edit-text tiddler=<> field=<> default="" placeholder={{$:/language/EditTemplate/Fields/Add/Value/Placeholder}} tabindex={{$:/config/EditTabIndex}} cancelPopups="yes"/> \ No newline at end of file +<$edit-text tiddler=<> field=<> default="" class="tc-edit-texteditor tc-edit-fieldeditor" placeholder={{$:/language/EditTemplate/Fields/Add/Value/Placeholder}} tabindex={{$:/config/EditTabIndex}} cancelPopups="yes"/> \ No newline at end of file diff --git a/editions/tw5.com/tiddlers/concepts/Customizing EditTemplate Field Rendering.tid b/editions/tw5.com/tiddlers/concepts/Customizing EditTemplate Field Rendering.tid index bc6a31f1f..bbdb4c771 100644 --- a/editions/tw5.com/tiddlers/concepts/Customizing EditTemplate Field Rendering.tid +++ b/editions/tw5.com/tiddlers/concepts/Customizing EditTemplate Field Rendering.tid @@ -13,7 +13,7 @@ The variables `currentTiddler` and `currentField` are set to pass information ab For example, a tiddler containing the following WikiText would render the field as an HTML input element of the type `date`. This will show a date picker for the fields on all modern browsers: ``` -<$edit-text tiddler=<> field=<> type="date" class="tc-edit-texteditor" placeholder="Set your date" tabindex={{$:/config/EditTabIndex}} cancelPopups="yes"/> +<$edit-text tiddler=<> field=<> type="date" class="tc-edit-texteditor tc-edit-fieldeditor" placeholder="Set your date" tabindex={{$:/config/EditTabIndex}} cancelPopups="yes"/> ``` The `tabindex` and `cancelPopups` attributes make sure the HTML input element behaves exactly the default elements provided by TiddlyWiki. @@ -21,11 +21,11 @@ The `tabindex` and `cancelPopups` attributes make sure the HTML input element be Not only the `EditTextWidget` can be used. A tiddler containing the following WikiText will render the field as a drop-down-list that allows the user to select the name of a tiddler. The name of the selected tiddler will be stored in the field. ``` -<$select tiddler=<> field=<> class="tc-edit-texteditor" cancelPopups="yes"> +<$select tiddler=<> field=<> class="tc-edit-texteditor tc-edit-fieldeditor" cancelPopups="yes"> <$list filter='[all[tiddlers]sort[title]]'> ``` -The class `tc-edit-texteditor` should be used to style the `input` and `select` elements to match the theme of the TiddlyWiki installation. \ No newline at end of file +The classes `tc-edit-texteditor` and `tc-edit-fieldeditor` should be used to style the `input` and `select` elements to match the theme of the TiddlyWiki installation. \ No newline at end of file diff --git a/themes/tiddlywiki/vanilla/base.tid b/themes/tiddlywiki/vanilla/base.tid index d79b9d788..145c5f2aa 100644 --- a/themes/tiddlywiki/vanilla/base.tid +++ b/themes/tiddlywiki/vanilla/base.tid @@ -1221,6 +1221,13 @@ button.tc-btn-invisible.tc-remove-tag-button { background-color: <>; } +.tc-tiddler-frame .tc-edit-fields input.tc-edit-fieldeditor, +.tc-tiddler-frame .tc-edit-fields select.tc-edit-fieldeditor, +.tc-tiddler-frame .tc-edit-fields textarea.tc-edit-fieldeditor { + margin: 0; + padding: 2px 3px; +} + .tc-tiddler-frame .tc-binary-warning { width: 100%; height: 5em;