1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2025-01-10 17:30:26 +00:00
TiddlyWiki5/editions/tw5.com/tiddlers/TestCases_WikifyWidget_WidgetValue_Fail.tid
Théophile Desmedt 106fe2dfb9
Provide examples for the wikify widget (#8792)
* Provide examples for the wikify widget

* fix a typo in the wikify widget doc tiddler

* Update and rename TestCases_WikifyWidget_WidgetInput_Fail.tid to TestCases_WikifyWidget_WidgetValue_Fail.tid

* Update and rename TestCases_WikifyWidget_WidgetInput_Success.tid to TestCases_WikifyWidget_WidgetValue_Success.tid

* Update WikifyWidget.tid

* Update TestCases_WikifyWidget_WidgetValue_Fail.tid

* Update TestCases_WikifyWidget_WidgetValue_Success.tid

* Update WikifyWidget.tid

* Update TestCases_WikifyWidget_WidgetValue_Success.tid

fix small error causing validation to fail

* Update TestCases_WikifyWidget_WidgetValue_Success.tid

* remove trailing end line

* remove trailing new line

* add description, remove modified field
2024-12-05 12:25:22 +00:00

33 lines
975 B
Plaintext

created: 20241202000005087
description: Using a widget as a value
tags: $:/tags/wiki-test-spec-failing
title: TestCases/WikifyWidget/WidgetValue/Fail
type: text/vnd.tiddlywiki-multiple
title: Narrative
If you try to directly use a widget as a value, you will instead get the raw wikitext of the widget and not the rendered value.
+
title: Output
<span style.color={{widget}} style.background={{target}}>
{{widget}} text on {{target}} is a good contrast
</span>
+
title: widget
text: <$transclude $variable="contrastcolour" target={{target}} fallbackTarget=<<fallbackTarget>> colourA={{colourA}} colourB={{colourB}} />
+
title: target
text: purple
+
title: colourA
text: white
+
title: colourB
text: black
+
title: ExpectedResult
<p><span style="color:white<$transclude $variable="contrastcolour" target={{target}} fallbackTarget=<<fallbackTarget>> colourA={{colourA}} colourB={{colourB}} />;background:purple;">
white text on purple is a good contrast
</span></p>