1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2024-10-31 23:26:18 +00:00
TiddlyWiki5/editions/test/tiddlers/tests/data/widgets/DataAttributes/SelectWidget-DataAttributes.tid

27 lines
933 B
Plaintext
Raw Normal View History

title: Widgets/DataAttributes/SelectWidget
description: Data Attributes for SelectWidget
type: text/vnd.tiddlywiki-multiple
tags: [[$:/tags/wiki-test-spec]]
title: Output
\whitespace trim
<$select tiddler='New Tiddler' class="myclass" field='text' default='Choose a new text' data-title={{Temp}} style.color={{{ [[Temp]get[color]] }}} onclick="clicked">
<option disabled>Choose a new text</option>
<option>A Tale of Two Cities</option>
<option>A New Kind of Science</option>
<option>The Dice Man</option>
</$select>
+
title: Actions
<$action-setfield $tiddler="Temp" $field="text" $value="Title2" color="red"/>
+
title: Temp
color: black
Title1
+
title: ExpectedResult
<p><select class="myclass" data-title="Title2" value="Choose a new text" style="color:red;"><option disabled="true">Choose a new text</option><option>A Tale of Two Cities</option><option>A New Kind of Science</option><option>The Dice Man</option></select></p>