1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2024-11-05 17:46:19 +00:00
TiddlyWiki5/editions/tw5.com/tiddlers/wikitext/Widgets in WikiText.tid
Jermolene 06a0d21734 Use double linebreaks to indicate content of a widget or html element should be parsed in block mode
Fixes #82.

The old behaviour was to parse the content of a widget or html element
in block mode if the opening tag was followed by a line break. The new
behaviour requires two line breaks.

This makes it possible to include linebreaks more liberally within
wikitext, although care must still be taken to only use double line
breaks when the block mode behaviour is desired.

The code change here is very simple, just a single line change in
html.js. Most of the other changes are to convert various single line
breaks into double line breaks.
2014-02-20 21:42:31 +00:00

29 lines
1017 B
Plaintext

created: 20131205160840915
modified: 20140220203320110
tags: wikitext
title: Widgets in WikiText
type: text/vnd.tiddlywiki
Widgets provide rich functionality within WikiText. They have the same syntax as [[HTML elements|HTML in WikiText]], but the tag name always starts with `$`. For example:
```
<$button message="tw-close-tiddler">Close Me!</$button>
```
Note that widgets inherit all the features of [[HTML in WikiText]]:
* Widget attributes can be specified as:
** Unquoted strings (that cannot contain spaces)
** Strings quoted with single or double quotes
** Macro invocations (eg `attr=<<myMacro>>`)
** Transclusions (eg, `attr={{MyTiddler!!field}}`)
* The content of a widget is parsed in inline mode unless the opening tag is followed by two linebreaks, which forces block mode
** 'Inline mode' means that 'block mode' parse rules like headings, tables and lists are not recognised
See [[HTML in WikiText]] for more details.
The available widgets include:
<$list filter="[tag[widget]sort[title]]"/>