mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2024-12-28 11:00:27 +00:00
106fe2dfb9
* 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
47 lines
1.6 KiB
Plaintext
47 lines
1.6 KiB
Plaintext
caption: wikify
|
|
created: 20160321144949700
|
|
modified: 20241202014354100
|
|
tags: Widgets
|
|
title: WikifyWidget
|
|
type: text/vnd.tiddlywiki
|
|
|
|
! Introduction
|
|
|
|
The <<.wid wikify>> widget parses and renders a string of text and assigns the result to a specified [[variable|Variables]]. The new value of the variable is available to the content within the wikify widget.
|
|
|
|
! Content and Attributes
|
|
|
|
The content of the `<$wikify>` widget is the scope for the value assigned to the variable.
|
|
|
|
|!Attribute |!Description |
|
|
|name |The name of the variable to assign |
|
|
|text |The text to parse and render |
|
|
|type |The ContentType of the text (defaults to `text/vnd.tiddlywiki`) |
|
|
|mode |The parse mode: [[block|Block Mode WikiText]] (the default) or [[inline|Inline Mode WikiText]] |
|
|
|output |Keyword indicating the desired output type, defaulting to `text` (see below) |
|
|
|
|
The available output types are:
|
|
|
|
|!Keyword |!Description |
|
|
|text |Return the plain text of the rendered output (ie HTML tags are omitted) |
|
|
|formattedtext |Return the plain text with simple text formatting of the rendered output (ie HTML tags are omitted) |
|
|
|html |Return the rendered HTML of the output |
|
|
|parsetree |Return a formatted JSON representation of the parse tree |
|
|
|widgettree |Return a formatted JSON representation of the widget tree |
|
|
|
|
! Examples
|
|
|
|
!! Using a widget as a value
|
|
|
|
<<testcase "TestCases/WikifyWidget/WidgetValue/Success">>
|
|
<<testcase "TestCases/WikifyWidget/WidgetValue/Fail">>
|
|
|
|
!! Accurate word count
|
|
|
|
<<testcase "TestCases/WikifyWidget/WordCount/Success">>
|
|
<<testcase "TestCases/WikifyWidget/WordCount/Fail">>
|
|
|
|
!! Exporting rendered html
|
|
|
|
<<testcase "TestCases/WikifyWidget/RenderHTML">>
|