mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2026-01-22 10:54:46 +00:00
Compare commits
44 Commits
super-safe
...
framed-edi
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
197276bf85 | ||
|
|
b1c295230d | ||
|
|
bffe538982 | ||
|
|
caac9bee92 | ||
|
|
36d766081d | ||
|
|
54548babc8 | ||
|
|
dccce5878c | ||
|
|
bfcb386343 | ||
|
|
f7c3ac4c54 | ||
|
|
2a19c60e20 | ||
|
|
c28dbd0025 | ||
|
|
29c2260457 | ||
|
|
d7c89de11d | ||
|
|
e0ff54a04e | ||
|
|
042f3c59ad | ||
|
|
07960f1527 | ||
|
|
5cdffd6943 | ||
|
|
ee0a32c8f1 | ||
|
|
4bb3d2ba34 | ||
|
|
e7c0ad484b | ||
|
|
e82053609b | ||
|
|
7926af8541 | ||
|
|
bcca4eca81 | ||
|
|
925ff202a0 | ||
|
|
97bc9039e6 | ||
|
|
e6149e7e29 | ||
|
|
e47f038d2a | ||
|
|
2789bc8ef6 | ||
|
|
3a2831870b | ||
|
|
4cddfa228b | ||
|
|
da1825e6c5 | ||
|
|
4ae2d8422b | ||
|
|
c9e1b91099 | ||
|
|
95f987544c | ||
|
|
308e207a67 | ||
|
|
aa5a6627e6 | ||
|
|
6f038e362e | ||
|
|
95a9c0bd54 | ||
|
|
0a20c08107 | ||
|
|
e6175227b2 | ||
|
|
714587cdfc | ||
|
|
d8c2ab3baf | ||
|
|
2bac676ac4 | ||
|
|
6732d96f78 |
@@ -5,7 +5,7 @@
|
||||
# Default to the current version number for building the plugin library
|
||||
|
||||
if [ -z "$TW5_BUILD_VERSION" ]; then
|
||||
TW5_BUILD_VERSION=v5.2.6
|
||||
TW5_BUILD_VERSION=v5.2.8
|
||||
fi
|
||||
|
||||
echo "Using TW5_BUILD_VERSION as [$TW5_BUILD_VERSION]"
|
||||
|
||||
@@ -2,4 +2,4 @@
|
||||
|
||||
# Remove any output files
|
||||
|
||||
find . -regex "^./editions/[a-z0-9\.-]*/output/.*" -delete
|
||||
find . -regex "^./editions/.*/output/.*" -delete
|
||||
|
||||
@@ -162,13 +162,13 @@ FramedEngine.prototype.fixHeight = function() {
|
||||
if(this.widget.editAutoHeight) {
|
||||
if(this.domNode && !this.domNode.isTiddlyWikiFakeDom) {
|
||||
var newHeight = $tw.utils.resizeTextAreaToFit(this.domNode,this.widget.editMinHeight);
|
||||
this.iframeNode.style.height = (newHeight + 14) + "px"; // +14 for the border on the textarea
|
||||
this.iframeNode.style.height = newHeight + "px";
|
||||
}
|
||||
} else {
|
||||
var fixedHeight = parseInt(this.widget.wiki.getTiddlerText(HEIGHT_VALUE_TITLE,"400px"),10);
|
||||
fixedHeight = Math.max(fixedHeight,20);
|
||||
this.domNode.style.height = fixedHeight + "px";
|
||||
this.iframeNode.style.height = (fixedHeight + 14) + "px";
|
||||
this.iframeNode.style.height = fixedHeight + "px";
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
@@ -84,8 +84,7 @@ exports.parseTokenString = function(source,pos,token) {
|
||||
};
|
||||
|
||||
/*
|
||||
Look for a token matching a regex at a specified position. Returns null if not found, otherwise returns {type: "regexp", match:, start:, end:,}
|
||||
Use the "Y" (sticky) flag to avoid searching the entire rest of the string
|
||||
Look for a token matching a regex. Returns null if not found, otherwise returns {type: "regexp", match:, start:, end:,}
|
||||
*/
|
||||
exports.parseTokenRegExp = function(source,pos,reToken) {
|
||||
var node = {
|
||||
@@ -146,7 +145,7 @@ exports.parseMacroParameter = function(source,pos) {
|
||||
start: pos
|
||||
};
|
||||
// Define our regexp
|
||||
var reMacroParameter = /(?:([A-Za-z0-9\-_]+)\s*:)?(?:\s*(?:"""([\s\S]*?)"""|"([^"]*)"|'([^']*)'|\[\[([^\]]*)\]\]|((?:(?:>(?!>))|[^\s>"'])+)))/y;
|
||||
var reMacroParameter = /(?:([A-Za-z0-9\-_]+)\s*:)?(?:\s*(?:"""([\s\S]*?)"""|"([^"]*)"|'([^']*)'|\[\[([^\]]*)\]\]|((?:(?:>(?!>))|[^\s>"'])+)))/g;
|
||||
// Skip whitespace
|
||||
pos = $tw.utils.skipWhiteSpace(source,pos);
|
||||
// Look for the parameter
|
||||
@@ -185,7 +184,7 @@ exports.parseMacroInvocation = function(source,pos) {
|
||||
params: []
|
||||
};
|
||||
// Define our regexps
|
||||
var reMacroName = /([^\s>"'=]+)/y;
|
||||
var reMacroName = /([^\s>"'=]+)/g;
|
||||
// Skip whitespace
|
||||
pos = $tw.utils.skipWhiteSpace(source,pos);
|
||||
// Look for a double less than sign
|
||||
@@ -222,7 +221,7 @@ exports.parseFilterVariable = function(source) {
|
||||
params: [],
|
||||
},
|
||||
pos = 0,
|
||||
reName = /([^\s"']+)/y;
|
||||
reName = /([^\s"']+)/g;
|
||||
// If there is no whitespace or it is an empty string then there are no macro parameters
|
||||
if(/^\S*$/.test(source)) {
|
||||
node.name = source;
|
||||
@@ -247,10 +246,10 @@ exports.parseAttribute = function(source,pos) {
|
||||
start: pos
|
||||
};
|
||||
// Define our regexps
|
||||
var reAttributeName = /([^\/\s>"'=]+)/y,
|
||||
reUnquotedAttribute = /([^\/\s<>"'=]+)/y,
|
||||
reFilteredValue = /\{\{\{([\S\s]+?)\}\}\}/y,
|
||||
reIndirectValue = /\{\{([^\}]+)\}\}/y;
|
||||
var reAttributeName = /([^\/\s>"'=]+)/g,
|
||||
reUnquotedAttribute = /([^\/\s<>"'=]+)/g,
|
||||
reFilteredValue = /\{\{\{([\S\s]+?)\}\}\}/g,
|
||||
reIndirectValue = /\{\{([^\}]+)\}\}/g;
|
||||
// Skip whitespace
|
||||
pos = $tw.utils.skipWhiteSpace(source,pos);
|
||||
// Get the attribute name
|
||||
|
||||
@@ -48,7 +48,7 @@ exports.parse = function() {
|
||||
// Advance the parser position to past the tag
|
||||
this.parser.pos = tag.end;
|
||||
// Check for an immediately following double linebreak
|
||||
var hasLineBreak = !tag.isSelfClosing && !!$tw.utils.parseTokenRegExp(this.parser.source,this.parser.pos,/([^\S\n\r]*\r?\n(?:[^\S\n\r]*\r?\n|$))/y);
|
||||
var hasLineBreak = !tag.isSelfClosing && !!$tw.utils.parseTokenRegExp(this.parser.source,this.parser.pos,/([^\S\n\r]*\r?\n(?:[^\S\n\r]*\r?\n|$))/g);
|
||||
// Set whether we're in block mode
|
||||
tag.isBlock = this.is.block || hasLineBreak;
|
||||
// Parse the body if we need to
|
||||
@@ -78,7 +78,7 @@ exports.parseTag = function(source,pos,options) {
|
||||
orderedAttributes: []
|
||||
};
|
||||
// Define our regexps
|
||||
var reTagName = /([a-zA-Z0-9\-\$]+)/y;
|
||||
var reTagName = /([a-zA-Z0-9\-\$]+)/g;
|
||||
// Skip whitespace
|
||||
pos = $tw.utils.skipWhiteSpace(source,pos);
|
||||
// Look for a less than sign
|
||||
@@ -129,7 +129,7 @@ exports.parseTag = function(source,pos,options) {
|
||||
pos = token.end;
|
||||
// Check for a required line break
|
||||
if(options.requireLineBreak) {
|
||||
token = $tw.utils.parseTokenRegExp(source,pos,/([^\S\n\r]*\r?\n(?:[^\S\n\r]*\r?\n|$))/y);
|
||||
token = $tw.utils.parseTokenRegExp(source,pos,/([^\S\n\r]*\r?\n(?:[^\S\n\r]*\r?\n|$))/g);
|
||||
if(!token) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -116,7 +116,7 @@ exports.parseImage = function(source,pos) {
|
||||
// Skip whitespace
|
||||
pos = $tw.utils.skipWhiteSpace(source,pos);
|
||||
// Get the source up to the terminating `]]`
|
||||
token = $tw.utils.parseTokenRegExp(source,pos,/(?:([^|\]]*?)\|)?([^\]]+?)\]\]/y);
|
||||
token = $tw.utils.parseTokenRegExp(source,pos,/(?:([^|\]]*?)\|)?([^\]]+?)\]\]/g);
|
||||
if(!token) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -58,7 +58,7 @@ exports.parse = function() {
|
||||
var reEnd;
|
||||
if(this.match[3]) {
|
||||
// If so, the end of the body is marked with \end
|
||||
reEnd = new RegExp("(\\r?\\n\\s*\\\\end[^\\S\\n\\r]*(?:" + $tw.utils.escapeRegExp(this.match[1]) + ")?(?:$|\\r?\\n))","mg");
|
||||
reEnd = new RegExp("(\\r?\\n[^\\S\\n\\r]*\\\\end[^\\S\\n\\r]*(?:" + $tw.utils.escapeRegExp(this.match[1]) + ")?(?:$|\\r?\\n))","mg");
|
||||
} else {
|
||||
// Otherwise, the end of the definition is marked by the end of the line
|
||||
reEnd = /($|\r?\n)/mg;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
title: $:/config/OfficialPluginLibrary
|
||||
tags: $:/tags/PluginLibrary
|
||||
url: https://tiddlywiki.com/library/v5.2.6/index.html
|
||||
url: https://tiddlywiki.com/library/v5.2.8/index.html
|
||||
caption: {{$:/language/OfficialPluginLibrary}}
|
||||
|
||||
{{$:/language/OfficialPluginLibrary/Hint}}
|
||||
|
||||
60
editions/prerelease/tiddlers/Release 5.2.8.tid
Normal file
60
editions/prerelease/tiddlers/Release 5.2.8.tid
Normal file
@@ -0,0 +1,60 @@
|
||||
caption: 5.2.8
|
||||
created: 20230326093239710
|
||||
modified: 20230326093239710
|
||||
tags: ReleaseNotes
|
||||
title: Release 5.2.8
|
||||
type: text/vnd.tiddlywiki
|
||||
|
||||
//[[See GitHub for detailed change history of this release|https://github.com/Jermolene/TiddlyWiki5/compare/v5.2.7...master]]//
|
||||
|
||||
! Major Improvements
|
||||
|
||||
! Translation Improvements
|
||||
|
||||
Improvements to the following translations:
|
||||
|
||||
*
|
||||
|
||||
! Plugin Improvements
|
||||
|
||||
*
|
||||
|
||||
! Accessibility Improvements
|
||||
|
||||
*
|
||||
|
||||
! Usability Improvements
|
||||
|
||||
*
|
||||
|
||||
! Widget Improvements
|
||||
|
||||
*
|
||||
|
||||
! Filter improvements
|
||||
|
||||
*
|
||||
|
||||
! Hackability Improvements
|
||||
|
||||
*
|
||||
|
||||
! Bug Fixes
|
||||
|
||||
*
|
||||
|
||||
! Node.js Improvements
|
||||
|
||||
*
|
||||
|
||||
! Performance Improvements
|
||||
|
||||
*
|
||||
|
||||
! Acknowledgements
|
||||
|
||||
[[@Jermolene|https://github.com/Jermolene]] would like to thank the contributors to this release who have generously given their time to help improve TiddlyWiki:
|
||||
|
||||
<<.contributors """
|
||||
|
||||
""">>
|
||||
@@ -1,6 +1,6 @@
|
||||
title: $:/config/OfficialPluginLibrary
|
||||
tags: $:/tags/PluginLibrary
|
||||
url: https://tiddlywiki.com/prerelease/library/v5.2.6/index.html
|
||||
url: https://tiddlywiki.com/prerelease/library/v5.2.8/index.html
|
||||
caption: {{$:/language/OfficialPluginLibrary}} (Prerelease)
|
||||
|
||||
The prerelease version of the official ~TiddlyWiki plugin library at tiddlywiki.com. Plugins, themes and language packs are maintained by the core team.
|
||||
|
||||
@@ -0,0 +1,22 @@
|
||||
title: Macros/TrailingNewlines
|
||||
description: Trailing newlines in macros must not be dropped
|
||||
type: text/vnd.tiddlywiki-multiple
|
||||
tags: [[$:/tags/wiki-test-spec]]
|
||||
|
||||
title: Output
|
||||
|
||||
\define inner()
|
||||
Paragraph 1
|
||||
|
||||
Paragraph 2
|
||||
\end
|
||||
\define outer()
|
||||
<$macrocall $name=inner />
|
||||
|
||||
\end
|
||||
<<outer>>
|
||||
|
||||
+
|
||||
title: ExpectedResult
|
||||
|
||||
<p>Paragraph 1</p><p>Paragraph 2</p>
|
||||
@@ -0,0 +1,16 @@
|
||||
caption: TiddlyStow (experimental)
|
||||
color: #FF8A65
|
||||
created: 20230403170650008
|
||||
delivery: Saver
|
||||
description: Save changes using new versions of Chromium based browsers
|
||||
method: save
|
||||
modified: 20230403183020357
|
||||
tags: Chrome Edge Opera Saving Linux Mac Windows
|
||||
title: Saving on Browser with TiddlyStow
|
||||
type: text/vnd.tiddlywiki
|
||||
url: https://github.com/btheado/tiddlystow
|
||||
|
||||
''Link:'' {{!!url}}
|
||||
|
||||
Tiddlystow saves TiddlyWiki files locally using the browser file system API (Chrome-based browsers currently).
|
||||
This is a simple web page for loading a local TiddlyWiki file and storing it back to the same local file requiring no plugins or extensions.
|
||||
@@ -8,4 +8,4 @@ A JSON tiddler is a [[data tiddler|DataTiddlers]] containing a [[JSON|JavaScript
|
||||
|
||||
Its [[ContentType]] is `application/json`.
|
||||
|
||||
The [[history list|$:/HistoryList]] is an of a JSON tiddler.
|
||||
The [[history list|$:/HistoryList]] is an example of a JSON tiddler.
|
||||
|
||||
12
editions/tw5.com/tiddlers/definitions/Tiddlyhost.tid
Normal file
12
editions/tw5.com/tiddlers/definitions/Tiddlyhost.tid
Normal file
@@ -0,0 +1,12 @@
|
||||
title: Tiddlyhost
|
||||
tags: definition
|
||||
created: 20230410105035569
|
||||
modified: 20230410105035569
|
||||
|
||||
<span style="float:right;">[img width=140 [Tiddlyhost Logo]]</span>
|
||||
|
||||
[[Tiddlyhost.com|https://tiddlyhost.com/]] is a hosting service for TiddlyWiki created by Simon Baird. Once you sign up and confirm your email you can create "sites", (i.e. ~TiddlyWikis), with support for online saving. Sites can be private or public, and you can optionally list them on the taggable and searchable [[Tiddlyhost Hub|https://tiddlyhost.com/hub]] where they'll be discoverable by others.
|
||||
|
||||
Unlike [[TiddlySpot|Saving on TiddlySpot]], [[Tiddlyhost|https://tiddlyhost.com]] is secure, open source, and has proper support for TiddlyWiki5. It also allows uploading existing ~TiddlyWiki files, supports TiddlyWikiClassic, and lets you claim ownership of your ~TiddlySpot sites. For more information see the [[FAQ|https://github.com/simonbaird/tiddlyhost/wiki/FAQ]] and the [[About|https://tiddlyhost.com/about]] page.
|
||||
|
||||
<div style="clear: both;"/>
|
||||
14
editions/tw5.com/tiddlers/definitions/Xememex.tid
Normal file
14
editions/tw5.com/tiddlers/definitions/Xememex.tid
Normal file
@@ -0,0 +1,14 @@
|
||||
title: Xememex
|
||||
tags: Definitions
|
||||
created: 20230410105035569
|
||||
modified: 20230410105035569
|
||||
|
||||
<span style="float:right;">[img width=340 [Xememex Logo]]</span>
|
||||
|
||||
Xememex is a multiuser TiddlyWiki from [[Federatial]]. It allows large groups of people to work together on intertwingled wikis that can share content.
|
||||
|
||||
The largest customer implementation has hundreds of online wikis with thousands of users. See https://manuals.annafreud.org/
|
||||
|
||||
Xememex is currently only available under commercial terms from Federatial. Contact [[Jeremy Ruston at Federatial|mailto:jeremy@federatial.com]] for more details.
|
||||
|
||||
<div style="clear: both;"/>
|
||||
@@ -1,9 +1,22 @@
|
||||
created: 20150118134611000
|
||||
modified: 20150124201839000
|
||||
modified: 20230325163424379
|
||||
myfield:
|
||||
tags: [[get Operator]] [[Operator Examples]]
|
||||
title: get Operator (Examples)
|
||||
type: text/vnd.tiddlywiki
|
||||
|
||||
<<.operator-example 1 "[all[current]get[draft.of]]" "the title of the tiddler of which the current tiddler is a draft">>
|
||||
<<.operator-example 2 "[get[tags]]">>
|
||||
<<.operator-example 3 "[each[tags]get[tags]]">>
|
||||
|
||||
<<.operator-example 2 "[get[tags]]" "returns the tags of all tiddlers without de-duplication">>
|
||||
|
||||
<<.operator-example 3 "[get[tags]unique[]]" "returns the tags of all tiddlers with de-duplication">>
|
||||
|
||||
<<.tip """If a data tiddler contains a field with an empty value, the empty string is not appended to the results.""">>
|
||||
|
||||
<<.operator-example 4 "[all[current]get[myfield]]" "the empty value of field <<.field myfield>> is not returned by the <<.olink get>> operator">>
|
||||
|
||||
<<.operator-example 5 "[all[current]has:field[myfield]] :map[get[myfield]]" "also returns the empty string">>
|
||||
The above example works by first checking if the input title has the field <<.field myfield>> and then using the [[Map Filter Run Prefix]] to replace the title with their value of that field. If the input tiddler does not have the field, an empty <<.em selection>> is returned. The subsequent [[Map Filter Run Prefix]] outputs an empty <<.em string>> when its run returns an empty [[selection|Title Selection]] (because the field is empty).
|
||||
|
||||
<<.operator-example 6 "[all[tiddlers]] :filter[get[created]compare:date:lt{HelloThere!!created}]" "return all tiddlers that are older than [[HelloThere]]">>
|
||||
The above example demonstrates two different ways of accessing field values in filters: Use <<.olink get>> when the title is not known in advance as with the [[Filter Filter Run Prefix]] where <<.var currentTiddler>> is set to the current input title. Use a [[TextReference]] as an indirect [[Filter Parameter]] when the title is known.
|
||||
|
||||
@@ -1,8 +1,19 @@
|
||||
created: 20150203140000000
|
||||
modified: 20170608150301791
|
||||
modified: 20230325163543621
|
||||
tags: [[getindex Operator]] [[Operator Examples]]
|
||||
title: getindex Operator (Examples)
|
||||
type: text/vnd.tiddlywiki
|
||||
|
||||
<<.operator-example 1 "[[$:/palettes/Vanilla]getindex[background]]" "returns the value at index ''background'' of the [[DataTiddler|DataTiddlers]] [[$:/palettes/Vanilla]]">>
|
||||
<<.operator-example 2 "[all[shadows+tiddlers]tag[$:/tags/Palette]getindex[background]]" "returns all background colors defined in any of the ColourPalettes">>
|
||||
<<.operator-example 1 "[[$:/palettes/Vanilla]getindex[background]]" "returns the value of property <<.value background>> of the [[DataTiddler|DataTiddlers]] [[$:/palettes/Vanilla]]">>
|
||||
|
||||
<<.operator-example 2 "[all[shadows+tiddlers]tag[$:/tags/Palette]getindex[background]]" "returns all background colors defined in any of the ColourPalettes (notice the duplicates in the resulting list)">>
|
||||
|
||||
<<.tip """If a data tiddler contains a property with an empty value, the empty string is not appended to the results.""">>
|
||||
|
||||
<<.operator-example 3 "[[ListopsData]getindex[DataIndex]]" "the empty value of the property <<.field ~DataIndex>> in [[ListopsData]] is not returned by the <<.olink getindex>> operator">>
|
||||
|
||||
<<.operator-example 4 "[[ListopsData]has:index[DataIndex]] :map[getindex[DataIndex]]" "also returns the empty string">>
|
||||
The above example works by first checking if the input title has the property <<.field ~DataIndex>> and then using the [[Map Filter Run Prefix]] to replace the title with their value of that property. If the input tiddler does not have the property, an empty <<.em selection>> is returned. The subsequent [[Map Filter Run Prefix]] outputs an empty <<.em string>> when its run returns an empty [[selection|Title Selection]] (because the property is empty).
|
||||
|
||||
<<.operator-example 5 "[[$:/palettes/Vanilla]indexes[]] :filter[[$:/palettes/Vanilla]getindex<currentTiddler>count[]compare:number:eq[0]]" "returns those colors in [[$:/palettes/Vanilla]] which are defined, but have no value assigned">>
|
||||
In the above example, <<.olink count>> is used to check if <<.olink getindex>> returns a result (i.e. the corresponding property has a value) or not.
|
||||
@@ -17,5 +17,5 @@ The regular expression `[0-9]{2}` matches two consecutive digits. Because it con
|
||||
<$macrocall
|
||||
$name="wikitext-example-without-html"
|
||||
src="""<$set name="digit-pattern" value="[0-9]{2}">
|
||||
<<list-links "[regexp:title<digit-pattern>]">>
|
||||
<<list-links "[regexp:title<digit-pattern>]" field:"title">>
|
||||
</$set>"""/>
|
||||
|
||||
@@ -1,17 +1,17 @@
|
||||
caption: get
|
||||
created: 20140426183123179
|
||||
modified: 20150203185001000
|
||||
modified: 20230309163844434
|
||||
op-input: a [[selection of titles|Title Selection]]
|
||||
op-output: the values of field <<.place F>> in each of the input titles
|
||||
op-parameter: the name of a [[field|TiddlerFields]]
|
||||
op-parameter-name: F
|
||||
op-purpose: select all values of a field in the input titles
|
||||
tags: [[Filter Operators]] [[Field Operators]]
|
||||
title: get Operator
|
||||
type: text/vnd.tiddlywiki
|
||||
caption: get
|
||||
op-purpose: select all values of a field in the input titles
|
||||
op-input: a [[selection of titles|Title Selection]]
|
||||
op-parameter: the name of a [[field|TiddlerFields]]
|
||||
op-parameter-name: F
|
||||
op-output: the values of field <<.place F>> in each of the input titles
|
||||
|
||||
Each input title is processed in turn. If the corresponding tiddler contains field <<.place F>>, and the value of this field is not empty, then its value is appended to the output.
|
||||
|
||||
Unlike most other [[Filter Operators]], the [[selection|Title Selection]] output by <<.op get>> can contain duplicates. To avoid duplicates, use `each[F]get[F]`.
|
||||
<<.tip "Unlike most other [[Filter Operators]], the [[selection|Title Selection]] output by <<.op get>> can contain duplicates. To avoid duplicates, use `get[F]unique[]`.">>
|
||||
|
||||
<<.operator-examples "get">>
|
||||
|
||||
@@ -1,17 +1,16 @@
|
||||
caption: getindex
|
||||
created: 20150203140000000
|
||||
modified: 20150203140000000
|
||||
modified: 20230309163838670
|
||||
op-input: a [[selection of titles|Title Selection]]
|
||||
op-output: the values of property <<.place P>> in each of the input titles
|
||||
op-parameter: the name of a [[property|DataTiddlers]]
|
||||
op-parameter-name: P
|
||||
op-purpose: select all values of a data property in the input titles
|
||||
tags: [[Filter Operators]] [[Field Operators]]
|
||||
title: getindex Operator
|
||||
caption: getindex
|
||||
op-purpose: select all values of a data property in the input titles
|
||||
|
||||
<$macrocall $name=".operator-def"
|
||||
input="a [[selection of titles|Title Selection]]"
|
||||
parameter="the name of a [[property|DataTiddlers]]"
|
||||
paramName="P"
|
||||
output="the values of property <<.place P>> in each of the input titles"
|
||||
/>
|
||||
Each input title is processed in turn, and is ignored if it does not denote a [[data tiddler|DataTiddlers]]. If the corresponding tiddler contains property <<.place P>>, and the value of this property is not empty, then its value is appended to the output.
|
||||
|
||||
Each input title is processed in turn, and is ignored if it does not denote a [[data tiddler|DataTiddlers]]. If the tiddler contains property <<.place P>>, the value of that property is [[dominantly appended|Dominant Append]] to the output.
|
||||
<<.tip "Unlike most other [[Filter Operators]], the [[selection|Title Selection]] output by <<.op getindex>> can contain duplicates. To avoid duplicates, use `getindex[P]unique[]`.">>
|
||||
|
||||
<<.operator-examples "getindex">>
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
caption: has
|
||||
created: 20140410103123179
|
||||
modified: 20190518145446047
|
||||
modified: 20230306143207920
|
||||
op-input: a [[selection of titles|Title Selection]]
|
||||
op-neg-output: ''without suffix''<br>» those input tiddlers in which field <<.place F>> does <<.em not>> exist or has an empty value<br>''suffix `field`''<br>» those input tiddlers in which field <<.place F>> does <<.em not>> exist<br>''suffix `index`''<br>» those input tiddlers in which index <<.place F>> does <<.em not>> exist
|
||||
op-output: ''without suffix''<br>» those input tiddlers in which field <<.place F>> has a non-empty value<br>''suffix `field`''<br>» those input tiddlers in which field <<.place F>> exists
|
||||
op-neg-output: ''without suffix''<br>» those input tiddlers in which field <<.place F>> does <<.em not>> exist or has an empty value<br>''suffix `field`''<br>» those input tiddlers in which field <<.place F>> does <<.em not>> exist<br>''suffix `index`''<br>» those input data tiddlers in which index <<.place F>> does <<.em not>> exist
|
||||
op-output: ''without suffix''<br>» those input tiddlers in which field <<.place F>> has a non-empty value<br>''suffix `field`''<br>» those input tiddlers in which field <<.place F>> exists<br>''suffix `index`''<br>» those input data tiddlers in which index <<.place F>> exists
|
||||
op-parameter: the name of a [[field|TiddlerFields]]<br>''suffix `index`''<br>» those input tiddlers in which index <<.place F>> exists
|
||||
op-parameter: the name of a [[field|TiddlerFields]] or, optionally an [[index|TextReference]]
|
||||
op-parameter-name: F
|
||||
|
||||
@@ -1,15 +1,23 @@
|
||||
created: 20130822170200000
|
||||
list: [[A Gentle Guide to TiddlyWiki]] [[Discover TiddlyWiki]] [[Some of the things you can do with TiddlyWiki]] [[Ten reasons to switch to TiddlyWiki]] Examples [[What happened to the original TiddlyWiki?]]
|
||||
modified: 20221219184500440
|
||||
modified: 20230326083239710
|
||||
tags: TableOfContents
|
||||
title: HelloThere
|
||||
type: text/vnd.tiddlywiki
|
||||
|
||||
!! ''Welcome to TiddlyWiki, a unique [[non-linear|Philosophy of Tiddlers]] notebook for [[capturing|Creating and editing tiddlers]], [[organising|Structuring TiddlyWiki]] and [[sharing|Sharing your tiddlers with others]] complex information''
|
||||
!!.tc-hero-heading ''Welcome to TiddlyWiki, a unique [[non-linear|Philosophy of Tiddlers]] notebook for [[capturing|Creating and editing tiddlers]], [[organising|Structuring TiddlyWiki]] and [[sharing|Sharing your tiddlers with others]] complex information''
|
||||
|
||||
Use it to keep your [[to-do list|TaskManagementExample]], to plan an [[essay or novel|"TiddlyWiki for Scholars" by Alberto Molina]], or to organise your wedding. Record every thought that crosses your brain, or build a flexible and responsive website.
|
||||
|
||||
Unlike conventional online services, TiddlyWiki lets you choose where to keep your data, guaranteeing that in the decades to come you will [[still be able to use|Future Proof]] the notes you take today.
|
||||
TiddlyWiki lets you choose where to keep your data, guaranteeing that in the decades to come you will [[still be able to use|Future Proof]] the notes you take today.
|
||||
|
||||
!! ''Quick Start''
|
||||
|
||||
<div class="tc-cards tc-action-card">
|
||||
<$list filter="[tag[Quick Start]]">
|
||||
<$macrocall $name="flex-card" bordercolor={{!!color}} textcolor={{!!text-color}} backgroundcolor={{!!background-color}} captionField="caption" descriptionField="text"/>
|
||||
</$list>
|
||||
</div>
|
||||
|
||||
!! ''Find Out More''
|
||||
|
||||
@@ -19,7 +27,7 @@ Unlike conventional online services, TiddlyWiki lets you choose where to keep yo
|
||||
</$list>
|
||||
</div>
|
||||
|
||||
!! ''~TiddlyWiki Hubs''
|
||||
!! ''Community''
|
||||
|
||||
<div class="tc-cards" style="font-size:0.7em;text-align:center;margin:3em auto;">
|
||||
<a href="https://talk.tiddlywiki.org/" class="tc-btn-big-green" style="border-radius:4px;background-color:#FF8C19;" target="_blank" rel="noopener noreferrer">
|
||||
@@ -40,6 +48,9 @@ Unlike conventional online services, TiddlyWiki lets you choose where to keep yo
|
||||
<a href="https://gitter.im/TiddlyWiki/public" class="tc-btn-big-green" style="border-radius:4px;background-color:#753a88;background-image:linear-gradient(to left,#cc2b5e,#753a88);" target="_blank" rel="noopener noreferrer">
|
||||
{{$:/core/images/gitter}} Gitter
|
||||
</a>
|
||||
<a href="https://www.reddit.com/r/TiddlyWiki5/" class="tc-btn-big-green" style="border-radius:4px;background-color:#FF4500;" target="_blank" rel="noopener noreferrer">
|
||||
{{Reddit Logo}} Reddit
|
||||
</a>
|
||||
</div>
|
||||
|
||||
!! ''Testimonials & Reviews''
|
||||
|
||||
@@ -0,0 +1,2 @@
|
||||
title: Quick Start
|
||||
list: [[Quick Start: Tiddlyhost]] [[Quick Start: Desktop]] [[Quick Start: DIY]] [[Quick Start: Xememex]]
|
||||
10
editions/tw5.com/tiddlers/hellothere/quickstart/desktop.tid
Normal file
10
editions/tw5.com/tiddlers/hellothere/quickstart/desktop.tid
Normal file
@@ -0,0 +1,10 @@
|
||||
title: Quick Start: Desktop
|
||||
tags: [[Quick Start]]
|
||||
caption: Desktop
|
||||
icon: $:/core/images/storyview-zoomin
|
||||
button-color: #37753e
|
||||
button-text: Download
|
||||
background: linear-gradient(90deg,#f0fff1, #ffffff)
|
||||
link: TiddlyDesktop
|
||||
|
||||
Download the official desktop application for macOS, Windows and Linux
|
||||
10
editions/tw5.com/tiddlers/hellothere/quickstart/diy.tid
Normal file
10
editions/tw5.com/tiddlers/hellothere/quickstart/diy.tid
Normal file
@@ -0,0 +1,10 @@
|
||||
title: Quick Start: DIY
|
||||
tags: [[Quick Start]]
|
||||
caption: DIY
|
||||
icon: $:/core/images/theme-button
|
||||
button-color: #ff4522
|
||||
button-text: Explore
|
||||
background: linear-gradient(90deg,#fff4f2, #ffffff)
|
||||
link: GettingStarted
|
||||
|
||||
Find the configuration that is right for you to get the full benefits of ~TiddlyWiki
|
||||
@@ -0,0 +1,10 @@
|
||||
title: Quick Start: Tiddlyhost
|
||||
tags: [[Quick Start]]
|
||||
caption: Tiddlyhost
|
||||
icon: $:/core/images/globe
|
||||
button-color: #00009a
|
||||
button-text: Create Account
|
||||
background: linear-gradient(90deg,#f5f5ff, #ffffff)
|
||||
link: Tiddlyhost
|
||||
|
||||
The easiest way to get started with an online ~TiddlyWiki
|
||||
10
editions/tw5.com/tiddlers/hellothere/quickstart/xememex.tid
Normal file
10
editions/tw5.com/tiddlers/hellothere/quickstart/xememex.tid
Normal file
@@ -0,0 +1,10 @@
|
||||
title: Quick Start: Xememex
|
||||
tags: [[Quick Start]]
|
||||
caption: Xememex
|
||||
icon: $:/core/images/star-filled
|
||||
button-color: #bf5fb6
|
||||
button-text: Find out more
|
||||
background: linear-gradient(90deg,#fff1fe, #ffffff)
|
||||
link: Xememex
|
||||
|
||||
For companies and teams, a multiuser ~TiddlyWiki from Federatial
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 68 KiB After Width: | Height: | Size: 80 KiB |
7
editions/tw5.com/tiddlers/images/Reddit Logo.tid
Normal file
7
editions/tw5.com/tiddlers/images/Reddit Logo.tid
Normal file
@@ -0,0 +1,7 @@
|
||||
title: Reddit Logo
|
||||
|
||||
<svg width="22pt" height="22pt" viewBox="0 0 20 20">
|
||||
<g>
|
||||
<path d="M16.67,10C16.641,9.22 15.992,8.593 15.211,8.593C14.834,8.593 14.472,8.739 14.2,9C13.063,8.227 11.725,7.799 10.35,7.77L11,4.65L13.14,5.1C13.194,5.605 13.626,5.993 14.134,5.993C14.683,5.993 15.134,5.542 15.134,4.993C15.134,4.444 14.683,3.993 14.134,3.993C13.779,3.993 13.449,4.183 13.27,4.49L10.82,4C10.798,3.995 10.776,3.993 10.754,3.993C10.607,3.993 10.48,4.097 10.45,4.24L9.71,7.71C8.318,7.731 6.962,8.159 5.81,8.94C5.539,8.685 5.181,8.543 4.81,8.543C4.009,8.543 3.35,9.202 3.35,10.003C3.35,10.573 3.683,11.092 4.2,11.33C4.189,11.476 4.189,11.624 4.2,11.77C4.2,14.01 6.81,15.83 10.03,15.83C13.25,15.83 15.86,14.01 15.86,11.77C15.871,11.624 15.871,11.476 15.86,11.33C16.363,11.08 16.679,10.561 16.67,10ZM12.3,12.04C11.751,12.04 11.3,11.589 11.3,11.04C11.3,10.491 11.751,10.04 12.3,10.04C12.849,10.04 13.3,10.491 13.3,11.04C13.301,11.053 13.301,11.067 13.301,11.08C13.301,11.629 12.849,12.08 12.301,12.08C12.297,12.08 12.294,12.08 12.29,12.08L12.3,12.04ZM12.48,13.75C11.771,14.285 10.897,14.557 10.01,14.52C9.123,14.557 8.249,14.285 7.54,13.75C7.5,13.702 7.479,13.641 7.479,13.579C7.479,13.431 7.601,13.309 7.749,13.309C7.811,13.309 7.872,13.33 7.92,13.37C8.521,13.811 9.255,14.033 10,14C10.746,14.041 11.483,13.825 12.09,13.39C12.142,13.339 12.212,13.311 12.285,13.311C12.438,13.311 12.564,13.437 12.564,13.59C12.564,13.665 12.534,13.737 12.48,13.79L12.48,13.75ZM6.67,11C6.67,10.451 7.121,10 7.67,10C8.219,10 8.67,10.451 8.67,11C8.67,11.549 8.219,12 7.67,12C7.121,12 6.67,11.549 6.67,11Z"/>
|
||||
</g>
|
||||
</svg>
|
||||
BIN
editions/tw5.com/tiddlers/images/Tiddlyhost Logo.png
Normal file
BIN
editions/tw5.com/tiddlers/images/Tiddlyhost Logo.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 17 KiB |
@@ -0,0 +1,3 @@
|
||||
title: Tiddlyhost Logo
|
||||
type: image/png
|
||||
tags: picture
|
||||
1
editions/tw5.com/tiddlers/images/Xememex Logo.svg
Normal file
1
editions/tw5.com/tiddlers/images/Xememex Logo.svg
Normal file
@@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="1073" height="232"><g fill="#000" fill-rule="nonzero"><path d="M157.972 224h26.053l-6.756-11.94-70.621-124.802-.04 7.95L157.124 8h-25.588L89.064 82.431h13.897L60.489 8H34.574l50.855 87.227-.051-7.969L14.756 212.06 8 224h25.761l2.289-4.102 66.949-120-13.98-.013 66.667 120zM1038.972 224h26.053l-6.756-11.94-70.621-124.802-.04 7.95 43.559-75.198L1038.124 8h-25.588l-2.302 4.035-40.17 70.396h13.897l-40.169-70.396L941.489 8h-25.915l7.013 12.029 43.842 75.198-.051-7.969-70.622 124.802L889 224h25.761l2.289-4.102 66.949-120-13.98-.013 66.667 120zM191 224h106.904l10-21.65H204.932l8 8V65.153l-8 8h101.955l10-21.65H204.932l8 8V21.65l-8 8h88.452l10-21.65H191v208zM478 224h106.904l10-21.65H491.932l8 8V65.153l-8 8h101.955l10-21.65H491.932l8 8V21.65l-8 8h88.452l10-21.65H478v208zM762 224h106.904l10-21.65H775.932l8 8V65.153l-8 8h101.955l10-21.65H775.932l8 8V21.65l-8 8h88.452l10-21.65H762v208zM437.831 224h22.214V8l-71.304 61.952h10.564L328 8v216h22.215V39.062l-12.48 5.968 55.911 49.911 56.357-49.889-12.172-5.99zM722.831 224h22.214V8l-71.304 61.952h10.564L613 8v216h22.215V39.062l-12.48 5.968 55.911 49.911 56.357-49.889-12.172-5.99z"/></g></svg>
|
||||
|
After Width: | Height: | Size: 1.2 KiB |
2
editions/tw5.com/tiddlers/images/Xememex Logo.svg.meta
Normal file
2
editions/tw5.com/tiddlers/images/Xememex Logo.svg.meta
Normal file
@@ -0,0 +1,2 @@
|
||||
type: image/svg+xml
|
||||
title: Xememex Logo
|
||||
@@ -15,7 +15,7 @@ Note: Each first [[step|Filter Step]] of a [[filter run|Filter Run]] not given a
|
||||
|
||||
;filter
|
||||
: A [[filter|Filters]] selecting which tiddlers to include
|
||||
;caption
|
||||
;field
|
||||
: The name of the field to transclude for each list item, defaulting to `caption`
|
||||
;type
|
||||
: An HTML element to use for the overall list element, defaulting to `ul`
|
||||
|
||||
@@ -1,11 +1,18 @@
|
||||
caption: 5.2.6
|
||||
created: 20230304213950684
|
||||
modified: 20230304213950684
|
||||
created: 20230320184352916
|
||||
modified: 20230320184352916
|
||||
released: 20230320184352916
|
||||
tags: ReleaseNotes
|
||||
title: Release 5.2.6
|
||||
type: text/vnd.tiddlywiki
|
||||
|
||||
//[[See GitHub for detailed change history of this release|https://github.com/Jermolene/TiddlyWiki5/compare/v5.2.5...master]]//
|
||||
//[[See GitHub for detailed change history of this release|https://github.com/Jermolene/TiddlyWiki5/compare/v5.2.5...v5.2.6]]//
|
||||
|
||||
<<.banner-credits
|
||||
credit:"""Congratulations to [[StS|https://talk.tiddlywiki.org/u/StS]] for their winning design for the banner for this release (here is the [[competition thread|https://talk.tiddlywiki.org/t/new-release-banner-competition-for-tiddlywiki-v5-2-6/6403/3]] and the [[voting thread|https://talk.tiddlywiki.org/t/vote-for-the-tiddlywiki-banner-v5-2-6/6469]]).
|
||||
"""
|
||||
url:"https://raw.githubusercontent.com/Jermolene/TiddlyWiki5/3a2831870b4418b8b01d155b057db5b7485562c1/editions/tw5.com/tiddlers/images/New%20Release%20Banner.png"
|
||||
>>
|
||||
|
||||
! Major Improvements
|
||||
|
||||
@@ -28,6 +35,7 @@ type: text/vnd.tiddlywiki
|
||||
Improvements to the following translations:
|
||||
|
||||
* Chinese
|
||||
* German
|
||||
* Italian
|
||||
* Polish
|
||||
|
||||
@@ -38,6 +46,7 @@ Improvements to the following translations:
|
||||
* <<.link-badge-updated "https://github.com/Jermolene/TiddlyWiki5/commit/524cee1489f260375cac8cfe878fdc5942a4596e">> [[XLSX Plugin|XLSX Utilities Edition]] to handle importing numeric fields
|
||||
* <<.link-badge-fixed "https://github.com/Jermolene/TiddlyWiki5/commit/81f514116657d0d567be7a4c45762a85beaa8bc0">> Dynannotate plugin crash when using the fake DOM used for static rendering
|
||||
* <<.link-badge-fixed "https://github.com/Jermolene/TiddlyWiki5/pull/7281">> bug where pasting text into the CodeMirror editor also opened an `$:/Import` tiddler
|
||||
* <<.link-badge-improved "https://github.com/Jermolene/TiddlyWiki5/pull/7334">> documentation for the [[Railroad Plugin]]
|
||||
|
||||
! Accessibility Improvements
|
||||
|
||||
@@ -88,6 +97,7 @@ Improvements to the following translations:
|
||||
* <<.link-badge-fixed "https://github.com/Jermolene/TiddlyWiki5/pull/7243">> usage of `importTitle` and `autoOpenOnImport` options for [[WidgetMessage: tm-import-tiddlers]]
|
||||
* <<.link-badge-fixed "https://github.com/Jermolene/TiddlyWiki5/pull/7276">> fixed text editor refresh when the palette is changed
|
||||
* <<.link-badge-fixed "https://github.com/Jermolene/TiddlyWiki5/issues/7270">> crash with LetWidget when referencing a variable that exists but has an undefined value
|
||||
* <<.link-badge-fixed "https://github.com/Jermolene/TiddlyWiki5/issues/7354">> unwanted double braces around tags specified in $:/config/NewTiddler/Tags when using "new here" button
|
||||
|
||||
! Node.js Improvements
|
||||
|
||||
@@ -100,7 +110,6 @@ Improvements to the following translations:
|
||||
|
||||
! Performance Improvements
|
||||
|
||||
* <<.link-badge-improved "https://github.com/Jermolene/TiddlyWiki5/pull/7297">> wikitext parsing to use "sticky" flag for improved performance
|
||||
* <<.link-badge-improved "https://github.com/Jermolene/TiddlyWiki5/pull/7299">> field indexer to more efficiently process lookups
|
||||
|
||||
! Acknowledgements
|
||||
@@ -128,6 +137,7 @@ m42e
|
||||
Marxsal
|
||||
mateuszwilczek
|
||||
newmedicine
|
||||
michsa
|
||||
pippep
|
||||
pmario
|
||||
saqimtiaz
|
||||
25
editions/tw5.com/tiddlers/releasenotes/Release 5.2.7.tid
Normal file
25
editions/tw5.com/tiddlers/releasenotes/Release 5.2.7.tid
Normal file
@@ -0,0 +1,25 @@
|
||||
caption: 5.2.7
|
||||
created: 20230326083239710
|
||||
modified: 20230326083239710
|
||||
released: 20230326083239710
|
||||
tags: ReleaseNotes
|
||||
title: Release 5.2.7
|
||||
type: text/vnd.tiddlywiki
|
||||
|
||||
//[[See GitHub for detailed change history of this release|https://github.com/Jermolene/TiddlyWiki5/compare/v5.2.6...v5.2.7]]//
|
||||
|
||||
<<.banner-credits
|
||||
credit:"""Congratulations to [[StS|https://talk.tiddlywiki.org/u/StS]] for their winning design for the banner for this release (here is the [[competition thread|https://talk.tiddlywiki.org/t/new-release-banner-competition-for-tiddlywiki-v5-2-6/6403/3]] and the [[voting thread|https://talk.tiddlywiki.org/t/vote-for-the-tiddlywiki-banner-v5-2-6/6469]]).
|
||||
"""
|
||||
url:"https://raw.githubusercontent.com/Jermolene/TiddlyWiki5/7926af85419ef2f813276a05833598d6d65e2ecd/editions/tw5.com/tiddlers/images/New%20Release%20Banner.png"
|
||||
>>
|
||||
|
||||
This is a bug fix release intended to resolve a backwards compatibility issue discovered in v5.2.6. See [[this GitHub ticket|https://github.com/Jermolene/TiddlyWiki5/issues/7371]] for the background.
|
||||
|
||||
The issue is that trailing newlines within a macro definitions were being ignored, which affected whether the content were parsed in inline or block mode.
|
||||
|
||||
Since v5.2.7 replaces v5.2.6 that was only released for less than a week, here is the [[release note for v5.2.6|Release 5.2.6]].
|
||||
|
||||
! Release Note for v5.2.6
|
||||
|
||||
{{Release 5.2.6}}
|
||||
@@ -15,7 +15,7 @@ Saving to a Git service is configured in the [[$:/ControlPanel]] in the ''Git Se
|
||||
|
||||
* ''Type'' - (mandatory) the type of the service (e.g. GitHub, GitLab)
|
||||
* ''Username'' - (mandatory) the username for the Git service account used for saving changes
|
||||
* ''Password'' - (mandatory) the OAUTH token or personal access token for the specified account. Note that GitHub deprecated password authetication, permitted authentication methods are shown in the[[API documentation|https://developer.github.com/v3/#authentication]].
|
||||
* ''Password'' - (mandatory) the OAUTH token or personal access token for the specified account. Note that GitHub deprecated password authentication, permitted authentication methods are shown in the [[API documentation|https://developer.github.com/v3/#authentication]].
|
||||
* ''Repository'' - (mandatory) the name of the Git repository. Both the owner name and the repository name must be specified. For example `Jermolene/TiddlyWiki5`
|
||||
* ''Branch'' - (optional) the name of the branch to be used within the Git repository. Defaults to `main` (~GitHub) or `master` (~GitLab)"
|
||||
* ''Path'' - (optional) the path to the target file. Defaults to `/`
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
created: 20150110182600000
|
||||
modified: 20211206080809651
|
||||
modified: 20230325161424684
|
||||
tags: [[Improving TiddlyWiki Documentation]]
|
||||
title: Documentation Macros
|
||||
type: text/vnd.tiddlywiki
|
||||
@@ -58,6 +58,13 @@ The following macros are used throughout ~TiddlyWiki's documentation. Their name
|
||||
|.wlink |a link to a widget |<<.wlink ButtonWidget>> |
|
||||
|.wlink2 |a link to a widget, with specified text |<<.wlink2 foo ButtonWidget>> |
|
||||
|
||||
!Tabs
|
||||
|!Macro |!Used for |!Example |
|
||||
|.doc-tabs |showing a tab set in a documentation tiddler | -- |
|
||||
|.doc-tab-link |button to activate a tab | -- |
|
||||
|.widget-attr-link |button with a widget attribute name to activate a tab | -- |
|
||||
|
||||
|
||||
!User interface
|
||||
|
||||
|!Macro |!Used for |!Example |
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
created: 20141226192500000
|
||||
modified: 20150117152552000
|
||||
title: Reference Tiddlers
|
||||
modified: 20230318160831470
|
||||
tags: [[Improving TiddlyWiki Documentation]]
|
||||
title: Reference Tiddlers
|
||||
|
||||
<<.def "Reference tiddlers">> offer raw information in a comprehensive interlinked way. The reader is likely to be an intermediate or expert user.
|
||||
|
||||
@@ -13,6 +13,7 @@ There are several subcategories:
|
||||
;User manual
|
||||
* Presenting technical details of ~WikiText features
|
||||
* Subcategorised: messages, operators, widgets, etc
|
||||
** Widget documentation should follow the [[Widget Documentation Style Guide]]
|
||||
|
||||
;Developer manual
|
||||
* Presenting technical details of ~TiddlyWiki's internal architecture
|
||||
|
||||
@@ -0,0 +1,37 @@
|
||||
created: 20230318160840043
|
||||
modified: 20230325162525198
|
||||
tags: [[Reference Tiddlers]]
|
||||
title: Widget Documentation Style Guide
|
||||
|
||||
Widget documentation generally consists of
|
||||
|
||||
* an introductory summary of the widget's function
|
||||
* an overview of attributes and how the widget content is handled
|
||||
* more detailed attribute explanation when required
|
||||
* examples
|
||||
|
||||
The //Content and Attributes// section should describe how the content of the widget is used, followed by a table of the possible attributes, each with a short description of a single sentence. The attribute names in the table and elsewhere in the tiddler should be rendered with the <<.var .attr>> macro. The <<.var .from-version>> macro should be used as first item in the description to designate the version at which a parameter became available.
|
||||
|
||||
A subsection should be used for parameters that need an //extended description//, possibly with separate examples. When there are more than 2 such subsection necessary, the subsections should be split into their own tiddlers, and the <<.var .doc-tabs>> macro should be used to transclude them into the widget documentation tiddler as tabs.
|
||||
|
||||
* The <<.var .doc-tabs>> macro is used without parameters
|
||||
* The <<.var .doc-tabs>> macro must not be used more than once within a single documentation tiddler
|
||||
* The tiddlers to be included in the tab group should be tagged with the respective widget documentation tiddler and have a <<.field description>> field set to <<.value tab>>
|
||||
* The <<.field caption>> contains the tab button text. It should be as short as possible. For the attribute name, the <<.var .attr>> macro should be used in the <<.field caption>>
|
||||
* The tab tiddlers should start with a level-2-heading that links to itself, so that they may be opened from within the tabs
|
||||
* They can contain examples if these are specific to the topic of the subsection
|
||||
|
||||
In the attribute table, the <<.var .widget-attr-link>> macro can be used to turn attributes into a button that activates the respective tab. The <<.var .widget-attr-link>> macro is used like this
|
||||
|
||||
```
|
||||
<<.widget-attr-link text:<display text> target:<title of corresponding tiddler> >>
|
||||
```
|
||||
|
||||
Elsewhere, the <<.var .doc-tab-link>> macro can be used to activate the respective tab
|
||||
|
||||
```
|
||||
<<.doc-tab-link text:<display text> target:<title of corresponding tiddler> tooltip:<tooltip to show when hovering over the button> class:<additional classes> >>
|
||||
```
|
||||
The parameters <<.param tooltip>> and <<.param class>> are optional.
|
||||
|
||||
Both link macros scroll to the tab group additionally to setting the selected tab. They can also be used within the tab contents tiddlers themselves. If a tab tiddler is opened outside the tab group, <<.var doc-tab-link>> will open the tiddler containing the tab group if it is not yet open, and scroll to its tab group if it is.
|
||||
@@ -1,5 +1,5 @@
|
||||
created: 20150117152607000
|
||||
modified: 20220714133424023
|
||||
modified: 20230325141733992
|
||||
tags: $:/tags/Macro
|
||||
title: $:/editions/tw5.com/doc-macros
|
||||
type: text/vnd.tiddlywiki
|
||||
@@ -61,6 +61,37 @@ type: text/vnd.tiddlywiki
|
||||
\define .toc-tab() <<.tab "TableOfContents">>
|
||||
\define .example-tab(_) <span class="doc-tab">$_$</span>
|
||||
|
||||
\define .doc-tabs()
|
||||
<$macrocall $name="tabs"
|
||||
tabsList="[tag<currentTiddler>description[tab]]"
|
||||
default={{{ [tag<currentTiddler>first[]] }}}
|
||||
explicitState={{{ [<currentTiddler>addprefix[$:/state/tab/]] }}}
|
||||
class={{{ [[doc-tabs]] [<currentTiddler>encodeuricomponent[]escapecss[]addprefix[doc-tabs-]] +[join[ ]] }}} />
|
||||
\end
|
||||
\define .doc-tab-link(text, target, tooltip:"", class:"")
|
||||
<!-- figure out where the addressed doc-tabs are -->
|
||||
<$tiddler tiddler={{{ [<currentTiddler>search:text[.doc-tabs]] :else[<currentTiddler>tags[]search:text[.doc-tabs]first[]] :else[<currentTiddler>] }}} >
|
||||
<$button class={{{ [[tc-btn-invisible tc-tiddlylink]] [<__class__>] +[join[ ]] }}}
|
||||
set={{{ [<currentTiddler>addprefix[$:/state/tab/]] }}}
|
||||
setTo=<<__target__>>
|
||||
tooltip=<<__tooltip__>>>
|
||||
<<__text__>>
|
||||
<!-- if tiddler with tabs is open, scroll to tabs, otherwise open that tiddler (relevant from within tab subtiddlers) -->
|
||||
<$list filter="[[$:/StoryList]contains<currentTiddler>]" variable="ignore" emptyMessage="<$action-navigate />">
|
||||
<$action-sendmessage $message="tm-scroll" selector={{{ [<currentTiddler>encodeuricomponent[]addprefix[.doc-tabs-]] }}} />
|
||||
</$list>
|
||||
<$action-sendmessage $message="tm-scroll" selector={{{ [<currentTiddler>encodeuricomponent[]escapecss[]addprefix[.doc-tabs-]] }}} />
|
||||
</$button>
|
||||
</$tiddler>
|
||||
\end
|
||||
\define .widget-attr-link(text, target)
|
||||
<$macrocall $name=".doc-tab-link"
|
||||
text={{{ [[<code class="doc-attr">]] [<__text__>] [[</code>]] +[join[]] }}}
|
||||
class="doc-tab-link"
|
||||
target=<<__target__>>
|
||||
tooltip={{{ [[Show more information about the ']] [<__text__>] [[' attribute]] +[join[]] }}} />
|
||||
\end
|
||||
|
||||
\define .button(_) <span class="doc-button">{{$:/core/ui/Buttons/$_$!!caption}}</span>
|
||||
|
||||
\define .icon(_) <span class="doc-icon">{{$_$}}</span>
|
||||
@@ -181,4 +212,4 @@ $credit$
|
||||
</ol>
|
||||
\end
|
||||
|
||||
<pre><$view field="text"/></pre>
|
||||
<pre><$view field="text"/></pre>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
created: 20150117152612000
|
||||
modified: 20220617125128201
|
||||
modified: 20230325101137075
|
||||
tags: $:/tags/Stylesheet
|
||||
title: $:/editions/tw5.com/doc-styles
|
||||
type: text/vnd.tiddlywiki
|
||||
@@ -285,4 +285,14 @@ ol.doc-github-contributors li {
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
.doc-tabs.tc-tab-buttons button {
|
||||
font-size: 1rem;
|
||||
padding: 0.5em;
|
||||
}
|
||||
.doc-tabs button .doc-attr {
|
||||
background-color: unset;
|
||||
color: #666;
|
||||
}
|
||||
.doc-tab-link .doc-attr {
|
||||
color: unset;
|
||||
}
|
||||
@@ -2,6 +2,10 @@ title: $:/core/templates/static.content
|
||||
|
||||
\define tv-wikilink-template() https://tiddlywiki.com/static/$uri_doubleencoded$.html
|
||||
|
||||
<!-- Mastodon verification -->
|
||||
|
||||
<a rel="me" href="https://fosstodon.org/@TiddlyWiki">Mastodon</a>
|
||||
|
||||
<!-- For Google, and people without JavaScript-->
|
||||
|
||||
<$reveal default="yes" text=<<savingEmpty>> type="nomatch">
|
||||
|
||||
@@ -6,6 +6,10 @@ type: text/vnd.tiddlywiki
|
||||
|
||||
\rules only filteredtranscludeinline transcludeinline macrodef macrocallinline macrocallblock
|
||||
|
||||
.tc-hero-heading a.tc-tiddlylink {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.tc-double-spaced-list li {
|
||||
padding-bottom: .5em;
|
||||
padding-top: .5em;
|
||||
@@ -140,26 +144,48 @@ type: text/vnd.tiddlywiki
|
||||
background: <<colour background>>;
|
||||
border-color: rgba(34,36,38,.15);
|
||||
box-shadow: 0 2px 25px 0 rgb(34 36 38 / 5%) inset;
|
||||
gap: 1em;
|
||||
}
|
||||
|
||||
.tc-cards.tc-action-card {
|
||||
text-align: center;
|
||||
background: none;
|
||||
}
|
||||
|
||||
.tc-cards.tc-action-card .tc-card-button {
|
||||
border: 1px solid <<colour foreground>>;
|
||||
background: <<colour foreground>>;
|
||||
margin: 0.5em;
|
||||
border-radius: 6px;
|
||||
padding: 0.5em;
|
||||
color: <<colour background>>;
|
||||
fill: <<colour background>>;
|
||||
}
|
||||
|
||||
.tc-cards.tc-action-card .tc-card-button svg {
|
||||
width: 0.65em;
|
||||
height: 0.65em;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
.tc-tiddlylink.tc-card {
|
||||
font-weight: normal;
|
||||
max-width: 100%;
|
||||
position: relative;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
background: <<colour background>>;
|
||||
color: <<colour foreground>>;
|
||||
width: 200px;
|
||||
min-height: 0;
|
||||
padding: 0 0 0.5em 0;
|
||||
margin: 0.5em;
|
||||
border: none;
|
||||
border-radius: 8px;
|
||||
box-shadow: 0 1px 3px 0 #d4d4d5, 0 0 0 1px #d4d4d5;
|
||||
transition: box-shadow 0.3s ease,transform .3s ease;
|
||||
}
|
||||
|
||||
.tc-cards.tc-cards-vertical .tc-tiddlylink.tc-card {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
@media (max-width: 500px) {
|
||||
|
||||
.tc-cards {
|
||||
@@ -180,8 +206,17 @@ type: text/vnd.tiddlywiki
|
||||
}
|
||||
|
||||
.tc-card-accent {
|
||||
border-top-left-radius: 8px;
|
||||
border-top-right-radius: 8px;
|
||||
height: 100%;
|
||||
display: flex;
|
||||
align-items: stretch;
|
||||
flex-direction: column;
|
||||
justify-content: stretch;
|
||||
border-radius: 8px;
|
||||
}
|
||||
|
||||
.tc-cards.tc-cards-vertical .tc-card-accent {
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.tc-tiddlylink.tc-card:hover {
|
||||
@@ -233,6 +268,8 @@ type: text/vnd.tiddlywiki
|
||||
}
|
||||
|
||||
.tc-card-image {
|
||||
border-top-left-radius: 8px;
|
||||
border-top-right-radius: 8px;
|
||||
line-height: 0;
|
||||
overflow: hidden;
|
||||
}
|
||||
@@ -254,7 +291,19 @@ type: text/vnd.tiddlywiki
|
||||
font-weight: 600;
|
||||
transition: color 0.3s ease-in-out;
|
||||
padding: 0 10px;
|
||||
margin: 0.5em 0;
|
||||
margin: 0.5em 0 0.25em 0;
|
||||
}
|
||||
|
||||
.tc-cards.tc-cards-vertical .tc-card-title {
|
||||
font-size: 1em;
|
||||
min-width: 10em;
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
.tc-cards.tc-cards-vertical .tc-card-title svg {
|
||||
width: 1em;
|
||||
height: 1em;
|
||||
vertical-align: text-bottom;
|
||||
}
|
||||
|
||||
.tc-card-subtitle,
|
||||
@@ -270,12 +319,17 @@ type: text/vnd.tiddlywiki
|
||||
.tc-card-body {
|
||||
font-size: 0.9em;
|
||||
line-height: 1.2;
|
||||
padding: 0 10px;
|
||||
padding: 0.25em 10px;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.tc-cards.tc-cards-vertical .tc-card-body {
|
||||
font-size: 1em;
|
||||
}
|
||||
|
||||
.tc-card-body-wrapper {
|
||||
position: relative;
|
||||
flex-grow: 1;
|
||||
}
|
||||
|
||||
.tc-tiddlylink.tc-card.tc-card-quote .tc-card-body:before {
|
||||
@@ -343,4 +397,4 @@ type: text/vnd.tiddlywiki
|
||||
.multi-columns {
|
||||
column-count: 2;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -95,10 +95,10 @@ That renders as:
|
||||
<<tw-code $tiddler$>>
|
||||
\end
|
||||
|
||||
\define flex-card(class,bordercolor:"",imageField:"image",captionField:"caption",subtitle:"",descriptionField:"description",linkField:"link")
|
||||
\define flex-card(class,bordercolor:"",backgroundcolor:"",textcolor:"",imageField:"image",captionField:"caption",subtitle:"",descriptionField:"description",linkField:"link")
|
||||
\whitespace trim
|
||||
<$link class={{{ [<__class__>addprefix[tc-card ]] }}} to={{{ [<currentTiddler>get<__linkField__>else<currentTiddler>] }}}>
|
||||
<div class="tc-card-accent" style.borderTop={{{ [<__bordercolor__>!is[blank]addprefix[5px solid ]] }}}>
|
||||
<div class="tc-card-accent" style.borderTop={{{ [<__bordercolor__>!is[blank]addprefix[5px solid ]] }}} style.background={{!!background}} style.backgroundColor=<<__backgroundcolor__>> style.color=<<__textcolor__>> style.fill=<<__textcolor__>>>
|
||||
<$list filter="[<currentTiddler>has[ribbon-text]]" variable="ignore">
|
||||
<div class="tc-card-ribbon-wrapper">
|
||||
<div class="tc-card-ribbon" style.backgroundColor={{{ [<currentTiddler>get[ribbon-color]else[red]] }}}>
|
||||
@@ -119,6 +119,7 @@ That renders as:
|
||||
<$text text=<<__subtitle__>>/>
|
||||
</div>
|
||||
</$list>
|
||||
<div class="tc-card-icon"><$transclude tiddler={{!!icon}}/></div>
|
||||
<div class="tc-card-body-wrapper">
|
||||
<div class="tc-card-body">
|
||||
<$transclude field=<<__descriptionField__>> mode="block"/>
|
||||
@@ -126,6 +127,11 @@ That renders as:
|
||||
<div class="tc-card-body-clear">
|
||||
</div>
|
||||
</div>
|
||||
<$list filter="[all[current]has[button-text]]" variable="ignore">
|
||||
<div class="tc-card-button" style.background-color={{!!button-color}} style.border-color={{!!button-color}}>
|
||||
<$text text={{!!button-text}}/> {{$:/core/images/chevron-right}}
|
||||
</div>
|
||||
</$list>
|
||||
</div>
|
||||
</$link>
|
||||
\end
|
||||
|
||||
@@ -1,9 +1,14 @@
|
||||
caption: $:/tags/ClassFilters/TiddlerTemplate
|
||||
created: 20221020035738692
|
||||
description: marks filters evaluated to dynamically add classes to the page template.
|
||||
modified: 20221020035933363
|
||||
modified: 20230326153057521
|
||||
tags: SystemTags
|
||||
title: SystemTag: $:/tags/ClassFilters/TiddlerTemplate
|
||||
type: text/vnd.tiddlywiki
|
||||
|
||||
The [[system tag|SystemTags]] `$:/tags/ClassFilters/TiddlerTemplate` marks filters evaluated to dynamically add their output as CSS classes to the tiddler template.
|
||||
|
||||
The variables available are within each filter:
|
||||
|
||||
* <<.var storyTiddler>>: the tiddler in the story for which the filter should be evaluated.
|
||||
* <<.var currentTiddler>>: the tiddler holding the filter definition being evaluated.
|
||||
|
||||
@@ -32,7 +32,7 @@ For example, the items "abc" and "123" can be appended to the field `myfield` us
|
||||
<$action-listops $field="myfield" $subfilter="abc 123"/>
|
||||
```
|
||||
|
||||
The same can be achieved using the `$filter` attribute and prepending the [[Filter Run]] `[all[current]get[myfield]enlist-input[]]` to the [[Filter Expression]]:
|
||||
The same can be achieved using the `$filter` attribute and prepending the [[Filter Run]] `[enlist{!!myfield}]` to the [[Filter Expression]]:
|
||||
|
||||
```
|
||||
<$action-listops $field="myfield" $filter="[enlist{!!myfield}] abc 123"/>
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
caption: <<.attr field>>
|
||||
created: 20230314171223911
|
||||
description: tab
|
||||
modified: 20230317161110431
|
||||
tags: CheckboxWidget
|
||||
title: CheckboxWidget (field Mode)
|
||||
|
||||
!!<<.link "<<.attr field>> Mode" "CheckboxWidget (field Mode)">>
|
||||
|
||||
Using the checkbox widget in field mode requires the <<.attr field>> attribute to specify the name of the field. The <<.attr checked>> and <<.attr unchecked>> attributes specify the values to be assigned to the field to correspond to its checked and unchecked states respectively. The <<.attr default>> attribute is used as a fallback value if the field is missing or contains a value that does not correspond to the value of the <<.attr checked>> or <<.attr unchecked>> attributes.
|
||||
|
||||
This example creates a checkbox that is checked if the field <<.field status>> is equal to <<.value open>> and unchecked if the field is equal to <<.value closed>>. If the field value is undefined then it defaults to <<.value closed>>.
|
||||
|
||||
<<wikitext-example-without-html """<$checkbox field="status" checked="open" unchecked="closed" default="closed"> Is it open?</$checkbox>
|
||||
|
||||
''status:'' {{!!status}}""">>
|
||||
@@ -0,0 +1,23 @@
|
||||
caption: <<.attr filter>>
|
||||
created: 20230314174505003
|
||||
description: tab
|
||||
modified: 20230325101447667
|
||||
tags: CheckboxWidget
|
||||
title: CheckboxWidget (filter Mode)
|
||||
|
||||
!!<<.link "<<.attr filter>> Mode" "CheckboxWidget (filter Mode)">>
|
||||
|
||||
Using the checkbox widget in filter mode requires the <<.attr filter>> attribute to contain a filter whose output will determine the checked state of the checkbox. In filter mode, checking the checkbox will not automatically make changes to any field of any tiddler. Instead, you can use the <<.attr actions>> attribute (or the <<.attr checkactions>> and <<.attr uncheckactions>> attributes) to specify what should happen when the checkbox is toggled. It is your responsibility to make sure the actions cause changes to the tiddlers or fields that the filter results depend on, so that the checkbox becomes properly checked or unchecked after the actions have triggered and the filter has updated.
|
||||
|
||||
If the filter returns an empty result, the checkbox will be unchecked. Otherwise, if the filter result is non-empty, the checkbox will be checked.
|
||||
|
||||
However, if either the <<.attr checked>> or <<.attr unchecked>> attributes (or both) are specified, then their values will be looked for in the filter result, instead of considering any non-empty value to mean <<.value checked>>.
|
||||
|
||||
This example creates the same checkbox as in the <<.doc-tab-link "listField mode example" "CheckboxWidget (listField Mode)">>, selecting between <<.value red>> and <<.value green>> in the <<.field colors>> list field, but using filters and actions to make the change.
|
||||
|
||||
<<wikitext-example-without-html """\define checkActions() <$action-listops $field="colors" $subfilter="-red green"/>
|
||||
\define uncheckActions() <$action-listops $field="colors" $subfilter="red -green"/>
|
||||
<$checkbox filter="[list[!!colors]]" checked="green" unchecked="red" default="red" checkactions=<<checkActions>> uncheckactions=<<uncheckActions>> > Is "green" in colors?</$checkbox>
|
||||
|
||||
''colors:'' {{!!colors}}
|
||||
""">>
|
||||
@@ -0,0 +1,31 @@
|
||||
caption: <<.attr indeterminate>>
|
||||
created: 20230315173145042
|
||||
description: tab
|
||||
modified: 20230317160908743
|
||||
tags: CheckboxWidget
|
||||
title: CheckboxWidget (indeterminate)
|
||||
|
||||
!!<<.link "<<.attr indeterminate>> Checkboxes" "CheckboxWidget (indeterminate)">>
|
||||
|
||||
If both the <<.attr checked>> and <<.attr unchecked>> attributes are specified, but neither one is found in the specified field (or index), the result can be ambiguous. Should the checkbox be checked or unchecked? Normally in such cases the checkbox will be unchecked, but if the <<.attr indeterminate>> attribute is set to <<.value yes>> (default is <<.value no>>), the checkbox will instead be in an "indeterminate" state. An indeterminate checkbox counts as false for most purposes — if you click it, the checkbox will become checked and the <<.attr checkactions>>, if any, will be triggered — but indeterminate checkboxes are displayed differently in the browser.
|
||||
|
||||
This example shows indeterminate checkboxes being used for categories in a shopping list (which could also be sub-tasks in a todo list, or many other things). If only some items in a category are selected, the category checkbox is indeterminate. You can click on the category checkboxes to see how indeterminate states are treated the same as the unchecked state, and clicking the box checks it and applies its check actions (in this case, checking all the boxes in that category). Try editing the <<.field fruits>> and <<.field vegetables>> fields on this tiddler and see what happens to the example when you do.
|
||||
|
||||
<<wikitext-example-without-html """\define check-all(field-name:"items") <$action-listops $field="selected-$field-name$" $filter="[list[!!$field-name$]]" />
|
||||
\define uncheck-all(field-name:"items") <$action-listops $field="selected-$field-name$" $filter="[[]]" />
|
||||
|
||||
<$checkbox filter="[list[!!selected-fruits]count[]]" checked={{{ [list[!!fruits]count[]] }}} unchecked="0" checkactions=<<check-all fruits>> uncheckactions=<<uncheck-all fruits>> indeterminate="yes"> fruits</$checkbox>
|
||||
<ul style="list-style: none">
|
||||
<$list variable="fruit" filter="[list[!!fruits]]">
|
||||
<li><$checkbox listField="selected-fruits" checked=<<fruit>>> <<fruit>></$checkbox></li>
|
||||
</$list>
|
||||
</ul>
|
||||
<$checkbox filter="[list[!!selected-vegetables]count[]]" checked={{{ [list[!!vegetables]count[]] }}} unchecked="0" checkactions=<<check-all vegetables>> uncheckactions=<<uncheck-all vegetables>> indeterminate="yes"> veggies</$checkbox>
|
||||
<ul style="list-style: none">
|
||||
<$list variable="veggie" filter="[list[!!vegetables]]">
|
||||
<li><$checkbox listField="selected-vegetables" checked=<<veggie>>> <<veggie>></$checkbox></li>
|
||||
</$list>
|
||||
</ul>
|
||||
|
||||
<p>Selected veggies: {{!!selected-vegetables}}<br/>
|
||||
Selected fruits: {{!!selected-fruits}}</p>""">>
|
||||
@@ -0,0 +1,16 @@
|
||||
caption: <<.attr index>>
|
||||
created: 20230314171351122
|
||||
description: tab
|
||||
modified: 20230317160939333
|
||||
tags: CheckboxWidget
|
||||
title: CheckboxWidget (index Mode)
|
||||
|
||||
!!<<.link "<<.attr index>> Mode" "CheckboxWidget (index Mode)">>
|
||||
|
||||
To use the checkbox widget in index mode set the <<.attr index>> attribute to a property of a [[DataTiddler|DataTiddlers]]. The <<.attr checked>> and <<.attr unchecked>> attributes specify the values to be assigned to the property and correspond to its checked and unchecked states respectively. The <<.attr default>> attribute is used as a fallback value if the property is undefined.
|
||||
|
||||
<<.warning "Make sure to set <<.attr tiddler>> correctly, because non-[[DataTiddlers]] will be overwritten without warning">>
|
||||
|
||||
The example below creates a checkbox that is checked if the property in the tiddler [[ExampleData]] by the name of the current tiddler is equal to <<.value selected>> and unchecked if the property is an empty string. If the property is undefined then it defaults to an empty string, meaning the checkbox will be unchecked if the property is missing.
|
||||
|
||||
<$macrocall $name="wikitext-example-without-html" src="""<$checkbox tiddler="ExampleData" index=<<currentTiddler>> checked="selected" unchecked="" default=""> Selected?</$checkbox>"""/>
|
||||
@@ -0,0 +1,26 @@
|
||||
caption: <<.attr listField>>
|
||||
created: 20230314171331190
|
||||
description: tab
|
||||
modified: 20230317160948525
|
||||
tags: CheckboxWidget
|
||||
title: CheckboxWidget (listField Mode)
|
||||
|
||||
!!<<.link "<<.attr listField>> Mode" "CheckboxWidget (listField Mode)">>
|
||||
|
||||
Using the checkbox widget in list mode requires the <<.attr listField>> attribute to specify the name of a field containing a list. The <<.attr checked>> attribute specifies the value that should be present or absent in the list when the checkbox is checked or unchecked respectively. If <<.attr checked>> is absent (or empty) but <<.attr unchecked>> is present, then the logic will be inverted: the checkbox will be checked when the <<.attr unchecked>> value is missing from the list, and unchecked when the <<.attr unchecked>> value is found in the list. If both <<.attr checked>> and <<.attr unchecked>> are present, the checkbox will work like a toggle, replacing the <<.attr checked>> value with the <<.attr unchecked>> value and vice-versa. Finally, if neither <<.attr checked>> nor <<.attr unchecked>> is specified, the checkbox will be checked if the field has anything in it, but unchecked if the field is missing or empty. (This is rarely useful. Most of the time you want to specify <<.attr checked>> or <<.attr unchecked>> or both.)
|
||||
|
||||
The <<.attr default>> attribute is used as a fallback for the checkbox state if the field is not defined.
|
||||
|
||||
The following table summarizes the possible combinations:
|
||||
|
||||
| !defined attributes| !<$checkbox tag="void" disabled="yes"/> | !<$checkbox field="tag" checked="void" default="void" disabled="yes" /> | !<$checkbox listField="tag" checked="void" unchecked="invalid" indeterminate="yes" disabled="yes" /> |
|
||||
| neither| field missing or list empty<br/>no <<.attr default>> defined | field has any value | -- |
|
||||
| <<.attr checked>>=<<.value item1>>| <<.value item1>> removed from list | <<.value item1>> added to list | -- |
|
||||
| <<.attr unchecked>>=<<.value item2>>| <<.value item2>> added to list | <<.value item2>> removed from list | -- |
|
||||
| both| <<.value item1>> removed from list<br/><<.value item2>> added to list | <<.value item1>> added to list<br/><<.value item2>> removed from list | <<.value item1>> not in list<br/><<.value item2>> not in list<br/>no <<.attr default>> defined |
|
||||
|
||||
This example creates a checkbox that is checked if the list field named <<.field colors>> contains <<.value green>> and unchecked if the field contains <<.value red>>. If the field is undefined, or if neither <<.value green>> nor <<.value red>> appears in the field, then it defaults to <<.value green>>, meaning that the checkbox will be checked.
|
||||
|
||||
<<wikitext-example-without-html """<$checkbox listField="colors" checked="green" unchecked="red" default="green"> Is "green" in colors?</$checkbox><br />''colors:'' {{!!colors}}""">>
|
||||
|
||||
Try editing the <<.field colors>> field of this tiddler to see how the example changes.
|
||||
@@ -0,0 +1,32 @@
|
||||
caption: <<.attr listIndex>>
|
||||
created: 20230314174442174
|
||||
description: tab
|
||||
modified: 20230317160929003
|
||||
tags: CheckboxWidget
|
||||
title: CheckboxWidget (listIndex Mode)
|
||||
|
||||
!!<<.link "<<.attr listIndex>> Mode" "CheckboxWidget (listIndex Mode)">>
|
||||
|
||||
Using the checkbox widget in index list mode requires the <<.attr listIndex>> attribute to specify the the property of a [[DataTiddler|DataTiddlers]]. This property contains a list. The <<.attr checked>> attribute specifies the value that should be present or absent in the list when the checkbox is checked or unchecked respectively. If <<.attr checked>> is absent (or empty) but <<.attr unchecked>> is present, then the logic will be inverted: the checkbox will be checked when the <<.attr unchecked>> value is missing from the list, and unchecked when the <<.attr unchecked>> value is found in the list. If both <<.attr checked>> and <<.attr unchecked>> are present, the checkbox will work like a toggle, replacing the <<.attr checked>> value with the <<.attr unchecked>> value and vice-versa. Finally, if neither <<.attr checked>> nor <<.attr unchecked>> is specified, the checkbox will be checked if the field has anything in it, but unchecked if the field is missing or empty. (This is rarely useful. Most of the time you want to specify <<.attr checked>> or <<.attr unchecked>> or both.)
|
||||
|
||||
The <<.attr default>> attribute is used as a fallback for the checkbox state if the property is undefined.
|
||||
|
||||
The following table summarizes the possible combinations:
|
||||
|
||||
| !defined attributes| !<$checkbox tag="void" disabled="yes"/> | !<$checkbox field="tag" checked="void" default="void" disabled="yes" /> | !<$checkbox listField="tag" checked="void" unchecked="invalid" indeterminate="yes" disabled="yes" /> |
|
||||
| neither| property missing or list empty<br/>no <<.attr default>> defined | property has any value | -- |
|
||||
| <<.attr checked>>=<<.value item1>>| <<.value item1>> removed from list | <<.value item1>> added to list | -- |
|
||||
| <<.attr unchecked>>=<<.value item2>>| <<.value item2>> added to list | <<.value item2>> removed from list | -- |
|
||||
| both| <<.value item1>> removed from list<br/><<.value item2>> added to list | <<.value item1>> added to list<br/><<.value item2>> removed from list | <<.value item1>> not in list<br/><<.value item2>> not in list<br/>no <<.attr default>> defined |
|
||||
|
||||
<<.warning "Make sure to set <<.attr tiddler>> correctly, because non-[[DataTiddlers]] will be overwritten without warning">>
|
||||
|
||||
The example below creates three checkboxes that each control a different value in a property of the ExampleData tiddler.
|
||||
|
||||
<$macrocall $name="wikitext-example-without-html" src="""<$set name=indexName filter="[<currentTiddler>addsuffix[ Colors]]" >
|
||||
<$checkbox tiddler="ExampleData" listIndex=<<indexName>> checked="green" unchecked="red" default="red"> Green or red?</$checkbox><br/>
|
||||
<$checkbox tiddler="ExampleData" listIndex=<<indexName>> checked="yellow" unchecked="blue" default="blue"> Yellow or blue?</$checkbox><br/>
|
||||
<$checkbox tiddler="ExampleData" listIndex=<<indexName>> checked="orange" unchecked="purple" default="purple"> Orange or purple?</$checkbox><br/>
|
||||
Colors list: <$text text={{{ [[ExampleData]getindex<indexName>] }}} />
|
||||
</$set>
|
||||
"""/>
|
||||
@@ -0,0 +1,18 @@
|
||||
caption: <<.attr tag>>
|
||||
created: 20230314171205017
|
||||
description: tab
|
||||
modified: 20230317161122617
|
||||
tags: CheckboxWidget
|
||||
title: CheckboxWidget (tag Mode)
|
||||
|
||||
!!<<.link "<<.attr tag>> Mode" "CheckboxWidget (tag Mode)">>
|
||||
|
||||
Using the checkbox widget in tag mode requires the <<.attr tag>> attribute to specify the name of the tag. The checkbox will be checked if the tiddler specified in the <<.attr tiddler>> attribute has the specified tag and unchecked if it does not.
|
||||
|
||||
This example creates a checkbox that flips the <<.tag done>> tag on the current tiddler:
|
||||
|
||||
<<wikitext-example-without-html """<$checkbox tag="done"> Is it done?</$checkbox>""">>
|
||||
|
||||
When the attribute <<.attr invertTag>> is set to <<.value yes>>, the checkbox will be checked if the tiddler does <<.em not>> have the specified tag and unchecked if it does.
|
||||
|
||||
<<wikitext-example-without-html """<$checkbox tag="done" invertTag="yes"> Is it not done?</$checkbox>""">>
|
||||
@@ -1,12 +1,13 @@
|
||||
caption: checkbox
|
||||
created: 20131024141900000
|
||||
modified: 20220402023600000
|
||||
tags: Widgets TriggeringWidgets
|
||||
colors: red orange yellow blue
|
||||
created: 20131024141900000
|
||||
fruits: bananas oranges grapes
|
||||
vegetables: carrots potatoes
|
||||
list: [[CheckboxWidget (tag Mode)]] [[CheckboxWidget (field Mode)]] [[CheckboxWidget (listField Mode)]] [[CheckboxWidget (index Mode)]] [[CheckboxWidget (listIndex Mode)]] [[CheckboxWidget (filter Mode)]] [[CheckboxWidget (indeterminate)]]
|
||||
modified: 20230316192632667
|
||||
tags: Widgets TriggeringWidgets
|
||||
title: CheckboxWidget
|
||||
type: text/vnd.tiddlywiki
|
||||
vegetables: carrots potatoes
|
||||
|
||||
! Introduction
|
||||
|
||||
@@ -20,111 +21,22 @@ The checkbox widget displays an HTML `<input type="checkbox">` element that is d
|
||||
The content of the `<$checkbox>` widget is displayed within an HTML `<label>` element immediately after the checkbox itself. This means that clicking on the content will toggle the checkbox.
|
||||
|
||||
|!Attribute |!Description |
|
||||
|tiddler |Title of the tiddler to manipulate (defaults to the [[current tiddler|Current Tiddler]]) |
|
||||
|tag |The name of the tag to which the checkbox is bound |
|
||||
|invertTag |When set to ''yes'', flips the tag binding logic so that the absence of the tag causes the checkbox to be checked |
|
||||
|field |The name of the field to which the checkbox is bound |
|
||||
|listField |<<.from-version "5.2.3">> The name of the field that contains the list to which the checkbox is bound |
|
||||
|index|<<.from-version "5.1.14">> The index of the //tiddler//, a [[DataTiddler|DataTiddlers]], to which the checkbox is bound<<.tip "be sure to set the //tiddler// correctly">>|
|
||||
|listIndex |<<.from-version "5.2.3">> Like <<.attr index>>, but treats the value as a list the same way that <<.attr listField>> does |
|
||||
|filter |<<.from-version "5.2.3">> A filter whose output determines the checked state of the checkbox |
|
||||
|checked |The value of the field corresponding to the checkbox being checked |
|
||||
|unchecked |The value of the field corresponding to the checkbox being unchecked |
|
||||
|default |The default value to use if the field is not defined |
|
||||
|indeterminate |Whether ambiguous values can produce indeterminate checkboxes (see below) |
|
||||
|class |The class that will be assigned to the label element <$macrocall $name=".tip" _="""<<.from-version "5.2.3">> `tc-checkbox` is always applied by default, as well as `tc-checkbox-checked` when checked"""/> |
|
||||
|actions |<<.from-version "5.1.14">> A string containing ActionWidgets to be triggered when the status of the checkbox changes (whether it is checked or unchecked) |
|
||||
|uncheckactions |<<.from-version "5.1.16">> A string containing ActionWidgets to be triggered when the checkbox is unchecked |
|
||||
|checkactions |<<.from-version "5.1.20">> A string containing ActionWidgets to be triggered when the checkbox is checked |
|
||||
|disabled|<<.from-version "5.1.23">> Optional, disables the checkbox if set to "yes". Defaults to "no"|
|
||||
|<<.attr tiddler>> |Title of the tiddler to manipulate (defaults to the [[Current Tiddler]]) |
|
||||
|<<.widget-attr-link tag "CheckboxWidget (tag Mode)">> |The name of the [[tag|Tagging]] to which the checkbox is bound |
|
||||
|<<.attr invertTag>> |When set to <<.value yes>>, flips the tag binding logic so that the absence of the tag causes the checkbox to be checked |
|
||||
|<<.widget-attr-link field "CheckboxWidget (field Mode)">> |The name of the field to which the checkbox is bound |
|
||||
|<<.widget-attr-link listField "CheckboxWidget (listField Mode)">> |<<.from-version "5.2.3">> The name of the field that contains the list to which the checkbox is bound |
|
||||
|<<.widget-attr-link index "CheckboxWidget (index Mode)">> |<<.from-version "5.1.14">> The property of the [[DataTiddler|DataTiddlers]] to which the checkbox is bound|
|
||||
|<<.widget-attr-link listIndex "CheckboxWidget (listIndex Mode)">> |<<.from-version "5.2.3">> Like <<.attr index>>, but treats the value as a list the same way that <<.attr listField>> does |
|
||||
|<<.widget-attr-link filter "CheckboxWidget (filter Mode)">> |<<.from-version "5.2.3">> A filter whose output determines the checked state of the checkbox |
|
||||
|<<.attr checked>> |The value of the field corresponding to the checkbox being checked |
|
||||
|<<.attr unchecked>> |The value of the field corresponding to the checkbox being unchecked |
|
||||
|<<.attr default>> |The default value to use if the field is not defined |
|
||||
|<<.widget-attr-link indeterminate "CheckboxWidget (indeterminate)">> |Whether ambiguous values can produce indeterminate checkboxes (see below) |
|
||||
|<<.attr class>> |The class that will be assigned to the `<label>` element <$macrocall $name=".tip" _="""<<.from-version "5.2.3">> `tc-checkbox` is always applied by default, as well as `tc-checkbox-checked` when checked"""/> |
|
||||
|<<.attr actions>> |<<.from-version "5.1.14">> A string containing ActionWidgets to be triggered when the status of the checkbox changes (whether it is checked or unchecked) |
|
||||
|<<.attr uncheckactions>> |<<.from-version "5.1.16">> A string containing ActionWidgets to be triggered when the checkbox is unchecked |
|
||||
|<<.attr checkactions>> |<<.from-version "5.1.20">> A string containing ActionWidgets to be triggered when the checkbox is checked |
|
||||
|<<.attr disabled>> |<<.from-version "5.1.23">> Optionally disables the checkbox if set to <<.value yes>> (defaults to <<.value no>>)|
|
||||
|
||||
!! Tag Mode
|
||||
|
||||
Using the checkbox widget in tag mode requires the ''tag'' attribute to specify the name of the tag. The ''tiddler'' attribute specifies the tiddler to target, defaulting to the current tiddler if not present.
|
||||
|
||||
This example creates a checkbox that flips the ''done'' tag on the current tiddler:
|
||||
|
||||
<<wikitext-example-without-html """<$checkbox tag="done"> Is it done?</$checkbox>""">>
|
||||
|
||||
!! Field Mode
|
||||
|
||||
Using the checkbox widget in field mode requires the ''field'' attribute to specify the name of the field. The ''checked'' and ''unchecked'' attributes specify the values to be assigned to the field to correspond to its checked and unchecked states respectively. The ''default'' attribute is used as a fallback value if the field is not defined.
|
||||
|
||||
This example creates a checkbox that is checked if the field ''status'' is equal to ''open'' and unchecked if the field is equal to ''closed''. If the field is undefined then it defaults to ''closed'', meaning that the checkbox will be unchecked if the ''status'' field is missing.
|
||||
|
||||
<<wikitext-example-without-html """<$checkbox field="status" checked="open" unchecked="closed" default="closed"> Is it open?</$checkbox><br />''status:'' {{!!status}}""">>
|
||||
|
||||
!! List Mode
|
||||
|
||||
Using the checkbox widget in list mode requires the ''listField'' attribute to specify the name of a field containing a list. The ''checked'' attribute specifies the value that should be present or absent in the list when the checkbox is checked or unchecked respectively. If ''checked'' is absent (or empty) but ''unchecked'' is present, then the logic will be inverted: the checkbox will be checked when the "unchecked" value is missing from the list, and unchecked when the "unchecked" value is found in the list. If both ''checked'' and ''unchecked'' are present, the checkbox will work like a toggle, replacing the ''checked'' value with the ''unchecked'' value and vice-versa. Finally, if neither ''checked'' nor ''unchecked'' is specified, the checkbox will be checked if the field has anything in it, but unchecked if the field is missing or empty. (This is rarely useful; most of the time you'll want to specify ''checked'' or ''unchecked'' or both.)
|
||||
|
||||
The ''default'' attribute is used as a fallback for the checkbox state if the field is not defined.
|
||||
|
||||
This example creates a checkbox that is checked if the list field named ''colors'' contains ''green'' and unchecked if the field contains ''red''. If the field is undefined, or if neither ''green'' nor ''red'' appears in the field, then it defaults to ''green'', meaning that the checkbox will be checked.
|
||||
|
||||
<<wikitext-example-without-html """<$checkbox listField="colors" checked="green" unchecked="red" default="green"> Is it green?</$checkbox><br />''colors:'' {{!!colors}}""">>
|
||||
|
||||
Try editing the ''colors'' field of this tiddler to see how the example changes.
|
||||
|
||||
!! Index Mode
|
||||
|
||||
To use the checkbox widget in index mode set the ''index'' attribute to the index of a [[DataTiddler|DataTiddlers]]. The ''checked'' and ''unchecked'' attributes specify the values to be assigned to the index and correspond to its checked and unchecked states respectively. The ''default'' attribute is used as a fallback value if the index is undefined.
|
||||
|
||||
The example below creates a checkbox that is checked if the index by the name of this tiddler in the tiddler ExampleData is equal to ''selected'' and unchecked if the index is an empty string. If the index is undefined then it defaults to an empty string, meaning the checkbox will be unchecked if the index is missing.
|
||||
|
||||
<$macrocall $name="wikitext-example-without-html" src="""<$checkbox tiddler="ExampleData" index=<<currentTiddler>> checked="selected" unchecked="" default=""> Selected?</$checkbox>"""/>
|
||||
|
||||
!! Index List Mode
|
||||
|
||||
Using the checkbox widget in index list mode requires the ''listIndex'' attribute to specify the the index of a [[DataTiddler|DataTiddlers]] containing a list. The ''checked'' attribute specifies the value that should be present or absent in the list when the checkbox is checked or unchecked respectively. If ''checked'' is absent (or empty) but ''unchecked'' is present, then the logic will be inverted: the checkbox will be checked when the "unchecked" value is missing from the list, and unchecked when the "unchecked" value is found in the list. If both ''checked'' and ''unchecked'' are present, the checkbox will work like a toggle, replacing the ''checked'' value with the ''unchecked'' value and vice-versa. Finally, if neither ''checked'' nor ''unchecked'' is specified, the checkbox will be checked if the field has anything in it, but unchecked if the field is missing or empty. (This is rarely useful; most of the time you'll want to specify ''checked'' or ''unchecked'' or both.)
|
||||
|
||||
The ''default'' attribute is used as a fallback for the checkbox state if the index is undefined.
|
||||
|
||||
The example below creates three checkboxes that each control a different value in an index field of the ExampleData tiddler.
|
||||
|
||||
<$macrocall $name="wikitext-example-without-html" src="""
|
||||
<$set name=indexName filter="[<currentTiddler>addsuffix[ Colors]]" >
|
||||
<$checkbox tiddler="ExampleData" listIndex=<<indexName>> checked="green" unchecked="red" default="red"> Green or red?</$checkbox> <br/>
|
||||
<$checkbox tiddler="ExampleData" listIndex=<<indexName>> checked="yellow" unchecked="blue" default="blue"> Yellow or blue?</$checkbox> <br/>
|
||||
<$checkbox tiddler="ExampleData" listIndex=<<indexName>> checked="orange" unchecked="purple" default="purple"> Orange or purple?</$checkbox> <br />
|
||||
Colors list: {{{ [[ExampleData]getindex<indexName>] }}}
|
||||
</$set>
|
||||
"""/>
|
||||
|
||||
!! Filter Mode
|
||||
|
||||
Using the checkbox widget in filter mode requires the ''filter'' attribute to contain a filter whose output will determine the checked state of the checkbox. In filter mode, checking the checkbox will not automatically make changes to any field of any tiddler. Instead, you can use the ''actions'' attribute (or ''checkactions'' and ''uncheckactions'') to specify what should happen when the checkbox is toggled. It is your responsibility to make sure the actions cause changes to the tiddlers or fields that the filter results depend on, so that the checkbox becomes properly checked or unchecked after the actions have triggered.
|
||||
|
||||
If the filter returns an empty result, the checkbox will be unchecked. Otherwise, if the filter result is non-empty, the checkbox will be checked. However, if either the ''checked'' or ''unchecked'' attributes (or both) are specified, then their values will be looked for in the filter result, instead of considering any non-empty value to mean "checked".
|
||||
|
||||
This example creates the same checkbox as in the list mode example, selecting between ''red'' and ''green'' in the ''colors'' list field, but using filters and actions to make the change.
|
||||
|
||||
<<wikitext-example-without-html """\define checkActions() <$action-listops $field="colors" $subfilter="-red green"/>
|
||||
\define uncheckActions() <$action-listops $field="colors" $subfilter="red -green"/>
|
||||
<$checkbox filter="[list[!!colors]]" checked="green" unchecked="red" default="red" checkactions=<<checkActions>> uncheckactions=<<uncheckActions>> > Is "green" in colors?</$checkbox><br />''colors:'' {{!!colors}}
|
||||
""">>
|
||||
|
||||
!! Indeterminate checkboxes
|
||||
|
||||
If both the ''checked'' and ''unchecked'' attributes are specified, but neither one is found in the specified field (or index), the result can be ambiguous. Should the checkbox be checked or unchecked? Normally in such cases the checkbox will be unchecked, but if the ''indeterminate'' attribute is set to "yes" (default is "no"), the checkbox will instead be in an "indeterminate" state. An indeterminate checkbox counts as false for most purposes — if you click it, the checkbox will become checked and the ''checkactions'', if any, will be triggered — but indeterminate checkboxes are displayed differently in the browser.
|
||||
|
||||
This example shows indeterminate checkboxes being used for categories in a shopping list (which could also be sub-tasks in a todo list, or many other things). If only some items in a category are selected, the category checkbox is indeterminate. You can click on the category checkboxes to see how indeterminate states are treated the same as the unchecked state, and clicking the box checks it and applies its check actions (in this case, checking all the boxes in that category). Try editing the <<.field fruits>> and <<.field vegetables>> fields on this tiddler and see what happens to the example when you do.
|
||||
|
||||
<<wikitext-example-without-html """\define check-all(field-name:"items") <$action-listops $field="selected-$field-name$" $filter="[list[!!$field-name$]]" />
|
||||
\define uncheck-all(field-name:"items") <$action-listops $field="selected-$field-name$" $filter="[[]]" />
|
||||
|
||||
<$checkbox filter="[list[!!selected-fruits]count[]]" checked={{{ [list[!!fruits]count[]] }}} unchecked="0" checkactions=<<check-all fruits>> uncheckactions=<<uncheck-all fruits>> indeterminate="yes"> fruits</$checkbox>
|
||||
<ul style="list-style: none">
|
||||
<$list variable="fruit" filter="[list[!!fruits]]">
|
||||
<li><$checkbox listField="selected-fruits" checked=<<fruit>>> <<fruit>></$checkbox></li>
|
||||
</$list>
|
||||
</ul>
|
||||
<$checkbox filter="[list[!!selected-vegetables]count[]]" checked={{{ [list[!!vegetables]count[]] }}} unchecked="0" checkactions=<<check-all vegetables>> uncheckactions=<<uncheck-all vegetables>> indeterminate="yes"> veggies</$checkbox>
|
||||
<ul style="list-style: none">
|
||||
<$list variable="veggie" filter="[list[!!vegetables]]">
|
||||
<li><$checkbox listField="selected-vegetables" checked=<<veggie>>> <<veggie>></$checkbox></li>
|
||||
</$list>
|
||||
</ul>
|
||||
|
||||
<p>Selected veggies: {{!!selected-vegetables}}<br/>
|
||||
Selected fruits: {{!!selected-fruits}}</p>""">>
|
||||
<<.doc-tabs>>
|
||||
|
||||
@@ -52,7 +52,7 @@
|
||||
"--render","[!is[system]]","[encodeuricomponent[]addprefix[static/]addsuffix[.html]]","text/plain","$:/core/templates/static.tiddler.html",
|
||||
"--render","$:/core/templates/static.template.css","static/static.css","text/plain"],
|
||||
"external-js": [
|
||||
"--render","$:/core/save/offline-external-js","index.html","text/plain",
|
||||
"--render","$:/core/save/offline-external-js","[[external-]addsuffix<version>addsuffix[.html]]","text/plain",
|
||||
"--render","$:/core/templates/tiddlywiki5.js","[[tiddlywikicore-]addsuffix<version>addsuffix[.js]]","text/plain"]
|
||||
},
|
||||
"config": {
|
||||
|
||||
@@ -525,3 +525,7 @@ Mateusz Wilczek, @mateuszwilczek, 2023/02/16
|
||||
Andrea Octo, @andrigamerita, 2023/02/24
|
||||
|
||||
HuanC Fu, @hffqyd, 2023/03/03
|
||||
|
||||
Michelle Saad, @michsa, 2023-03-08
|
||||
|
||||
Yukai Chou, @muzimuzhi, 2023-04-07
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "tiddlywiki",
|
||||
"preferGlobal": "true",
|
||||
"version": "5.2.6-prerelease",
|
||||
"version": "5.2.8-prerelease",
|
||||
"author": "Jeremy Ruston <jeremy@jermolene.com>",
|
||||
"description": "a non-linear personal web notebook",
|
||||
"contributors": [
|
||||
|
||||
10
readme.md
10
readme.md
@@ -1,7 +1,15 @@
|
||||
<p>Welcome to <a class="tc-tiddlylink tc-tiddlylink-resolves" href="https://tiddlywiki.com/static/TiddlyWiki.html">TiddlyWiki</a>, a non-linear personal web notebook that anyone can use and keep forever, independently of any corporation.</p><p><a class="tc-tiddlylink tc-tiddlylink-resolves" href="https://tiddlywiki.com/static/TiddlyWiki.html">TiddlyWiki</a> is a complete interactive wiki in <a class="tc-tiddlylink tc-tiddlylink-resolves" href="https://tiddlywiki.com/static/JavaScript.html">JavaScript</a>. It can be used as a single HTML file in the browser or as a powerful Node.js application. It is highly customisable: the entire user interface is itself implemented in hackable <a class="tc-tiddlylink tc-tiddlylink-resolves" href="https://tiddlywiki.com/static/WikiText.html">WikiText</a>.</p><p>Learn more and see it in action at <a class="tc-tiddlylink-external" href="https://tiddlywiki.com/" rel="noopener noreferrer" target="_blank">https://tiddlywiki.com/</a></p><p>Developer documentation is in progress at <a class="tc-tiddlylink-external" href="https://tiddlywiki.com/dev/" rel="noopener noreferrer" target="_blank">https://tiddlywiki.com/dev/</a></p><h1 class="">Join the Community</h1><p>
|
||||
<h2 class="">Official Forums</h2><p>The new official forum for talking about TiddlyWiki: requests for help, announcements of new releases and plugins, debating new features, or just sharing experiences. You can participate via the associated website, or subscribe via email.</p><p><a class="tc-tiddlylink-external" href="https://talk.tiddlywiki.org/" rel="noopener noreferrer" target="_blank">https://talk.tiddlywiki.org/</a></p><p>Note that talk.tiddlywiki.org is a community run service that we host and maintain ourselves. The modest running costs are covered by community contributions.</p><p>For the convenience of existing users, we also continue to operate the original TiddlyWiki group (hosted on Google Groups since 2005):</p><p><a class="tc-tiddlylink-external" href="https://groups.google.com/group/TiddlyWiki" rel="noopener noreferrer" target="_blank">https://groups.google.com/group/TiddlyWiki</a></p><h2 class="">Developer Forums</h2><p>There are several resources for developers to learn more about <a class="tc-tiddlylink tc-tiddlylink-resolves" href="https://tiddlywiki.com/static/TiddlyWiki.html">TiddlyWiki</a> and to discuss and contribute to its development.</p><ul><li><a class="tc-tiddlylink-external" href="https://tiddlywiki.com/dev" rel="noopener noreferrer" target="_blank">tiddlywiki.com/dev</a> is the official developer documentation</li><li>Get involved in the <a class="tc-tiddlylink-external" href="https://github.com/Jermolene/TiddlyWiki5" rel="noopener noreferrer" target="_blank">development on GitHub</a><ul><li><a class="tc-tiddlylink-external" href="https://github.com/Jermolene/TiddlyWiki5/discussions" rel="noopener noreferrer" target="_blank">Discussions</a> are for Q&A and open-ended discussion</li><li><a class="tc-tiddlylink-external" href="https://github.com/Jermolene/TiddlyWiki5/issues" rel="noopener noreferrer" target="_blank">Issues</a> are for raising bug reports and proposing specific, actionable new ideas</li></ul></li><li>The older TiddlyWikiDev Google Group is now closed in favour of <a class="tc-tiddlylink-external" href="https://github.com/Jermolene/TiddlyWiki5/discussions" rel="noopener noreferrer" target="_blank">GitHub Discussions</a> but remains a useful archive: <a class="tc-tiddlylink-external" href="https://groups.google.com/group/TiddlyWikiDev" rel="noopener noreferrer" target="_blank">https://groups.google.com/group/TiddlyWikiDev</a><ul><li>An enhanced group search facility is available on <a class="tc-tiddlylink-external" href="https://www.mail-archive.com/tiddlywikidev@googlegroups.com/" rel="noopener noreferrer" target="_blank">mail-archive.com</a></li></ul></li><li>Follow <a class="tc-tiddlylink-external" href="http://twitter.com/#!/TiddlyWiki" rel="noopener noreferrer" target="_blank">@TiddlyWiki on Twitter</a> for the latest news</li><li>Chat at <a class="tc-tiddlylink-external" href="https://gitter.im/TiddlyWiki/public" rel="noopener noreferrer" target="_blank">https://gitter.im/TiddlyWiki/public</a> (development room coming soon)</li></ul><h2 class="">Other Forums</h2><ul><li><a class="tc-tiddlylink-external" href="https://www.reddit.com/r/TiddlyWiki5/" rel="noopener noreferrer" target="_blank">TiddlyWiki Subreddit</a></li><li>Chat with Gitter at <a class="tc-tiddlylink-external" href="https://gitter.im/TiddlyWiki/public" rel="noopener noreferrer" target="_blank">https://gitter.im/TiddlyWiki/public</a> !</li><li>Chat on Discord at <a class="tc-tiddlylink-external" href="https://discord.gg/HFFZVQ8" rel="noopener noreferrer" target="_blank">https://discord.gg/HFFZVQ8</a></li></ul><h3 class="">Documentation</h3><p>There is also a discussion group specifically for discussing <a class="tc-tiddlylink tc-tiddlylink-resolves" href="https://tiddlywiki.com/static/TiddlyWiki.html">TiddlyWiki</a> documentation improvement initiatives: <a class="tc-tiddlylink-external" href="https://groups.google.com/group/tiddlywikidocs" rel="noopener noreferrer" target="_blank">https://groups.google.com/group/tiddlywikidocs</a>
|
||||
</p>
|
||||
</p><h1 class="">Installing <a class="tc-tiddlylink tc-tiddlylink-resolves" href="https://tiddlywiki.com/static/TiddlyWiki.html">TiddlyWiki</a> on Node.js</h1><ol><li>Install <a class="tc-tiddlylink tc-tiddlylink-resolves" href="https://tiddlywiki.com/static/Node.js.html">Node.js</a><ul><li>Linux: <blockquote><div><em>Debian/Ubuntu</em>:<br><code>apt install nodejs</code><br>May need to be followed up by:<br><code>apt install npm</code></div><div><em>Arch Linux</em><br><code>yay -S tiddlywiki</code> <br>(installs node and tiddlywiki)</div></blockquote></li><li>Mac<blockquote><div><code>brew install node</code></div></blockquote></li><li>Android<blockquote><div><a class="tc-tiddlylink tc-tiddlylink-resolves" href="https://tiddlywiki.com/static/Serving%2520TW5%2520from%2520Android.html">Termux for Android</a></div></blockquote></li><li>Other <blockquote><div>See <a class="tc-tiddlylink-external" href="http://nodejs.org" rel="noopener noreferrer" target="_blank">http://nodejs.org</a></div></blockquote></li></ul></li><li>Open a command line terminal and type:<blockquote><div><code>npm install -g tiddlywiki</code></div><div>If it fails with an error you may need to re-run the command as an administrator:</div><div><code>sudo npm install -g tiddlywiki</code> (Mac/Linux)</div></blockquote></li><li>Ensure TiddlyWiki is installed by typing:<blockquote><div><code>tiddlywiki --version</code></div></blockquote><ul><li>In response, you should see <a class="tc-tiddlylink tc-tiddlylink-resolves" href="https://tiddlywiki.com/static/TiddlyWiki.html">TiddlyWiki</a> report its current version (eg "5.2.5". You may also see other debugging information reported.)</li></ul></li><li>Try it out:<ol><li><code>tiddlywiki mynewwiki --init server</code> to create a folder for a new wiki that includes server-related components</li><li><code>tiddlywiki mynewwiki --listen</code> to start <a class="tc-tiddlylink tc-tiddlylink-resolves" href="https://tiddlywiki.com/static/TiddlyWiki.html">TiddlyWiki</a></li><li>Visit <a class="tc-tiddlylink-external" href="http://127.0.0.1:8080/" rel="noopener noreferrer" target="_blank">http://127.0.0.1:8080/</a> in your browser</li><li>Try editing and creating tiddlers</li></ol></li><li>Optionally, make an offline copy:<ul><li>click the <span class="doc-icon"><svg class="tc-image-save-button tc-image-button" height="22pt" viewBox="0 0 128 128" width="22pt"><path d="M120.783 34.33c4.641 8.862 7.266 18.948 7.266 29.646 0 35.347-28.653 64-64 64-35.346 0-64-28.653-64-64 0-35.346 28.654-64 64-64 18.808 0 35.72 8.113 47.43 21.03l2.68-2.68c3.13-3.13 8.197-3.132 11.321-.008 3.118 3.118 3.121 8.193-.007 11.32l-4.69 4.691zm-12.058 12.058a47.876 47.876 0 013.324 17.588c0 26.51-21.49 48-48 48s-48-21.49-48-48 21.49-48 48-48c14.39 0 27.3 6.332 36.098 16.362L58.941 73.544 41.976 56.578c-3.127-3.127-8.201-3.123-11.32-.005-3.123 3.124-3.119 8.194.006 11.319l22.617 22.617a7.992 7.992 0 005.659 2.347c2.05 0 4.101-.783 5.667-2.349l44.12-44.12z" fill-rule="evenodd"></path></svg></span> <strong>save changes</strong> button in the sidebar, <strong>OR</strong></li><li><code>tiddlywiki mynewwiki --build index</code></li></ul></li></ol><p>The <code>-g</code> flag causes <a class="tc-tiddlylink tc-tiddlylink-resolves" href="https://tiddlywiki.com/static/TiddlyWiki.html">TiddlyWiki</a> to be installed globally. Without it, <a class="tc-tiddlylink tc-tiddlylink-resolves" href="https://tiddlywiki.com/static/TiddlyWiki.html">TiddlyWiki</a> will only be available in the directory where you installed it.</p><p><div class="doc-icon-block"><div class="doc-block-icon"><svg class="tc-image-warning tc-image-button" height="22pt" viewBox="0 0 128 128" width="22pt"><path d="M57.072 11c3.079-5.333 10.777-5.333 13.856 0l55.426 96c3.079 5.333-.77 12-6.928 12H8.574c-6.158 0-10.007-6.667-6.928-12l55.426-96zM64 37c-4.418 0-8 3.582-8 7.994v28.012C56 77.421 59.59 81 64 81c4.418 0 8-3.582 8-7.994V44.994C72 40.579 68.41 37 64 37zm0 67a8 8 0 100-16 8 8 0 000 16z" fill-rule="evenodd"></path></svg></div> If you are using Debian or Debian-based Linux and you are receiving a <code>node: command not found</code> error though node.js package is installed, you may need to create a symbolic link between <code>nodejs</code> and <code>node</code>. Consult your distro's manual and <code>whereis</code> to correctly create a link. See github <a class="tc-tiddlylink-external" href="http://github.com/Jermolene/TiddlyWiki5/issues/1434" rel="noopener noreferrer" target="_blank">issue 1434</a>. <br><br>Example Debian v8.0: <code>sudo ln -s /usr/bin/nodejs /usr/bin/node</code></div></p><p><br>
|
||||
</p><h1 class="">Installing <a class="tc-tiddlylink tc-tiddlylink-resolves" href="https://tiddlywiki.com/static/TiddlyWiki.html">TiddlyWiki</a> on Node.js</h1><ol><li>Install <a class="tc-tiddlylink tc-tiddlylink-resolves" href="https://tiddlywiki.com/static/Node.js.html">Node.js</a><ul><li>Linux: <blockquote><div><em>Debian/Ubuntu</em>:<br><code>apt install nodejs</code><br>May need to be followed up by:<br><code>apt install npm</code></div><div><em>Arch Linux</em><br><code>yay -S tiddlywiki</code> <br>(installs node and tiddlywiki)</div></blockquote></li><li>Mac<blockquote><div><code>brew install node</code></div></blockquote></li><li>Android<blockquote><div><a class="tc-tiddlylink tc-tiddlylink-resolves" href="https://tiddlywiki.com/static/Serving%2520TW5%2520from%2520Android.html">Termux for Android</a></div></blockquote></li><li>Other <blockquote><div>See <a class="tc-tiddlylink-external" href="http://nodejs.org" rel="noopener noreferrer" target="_blank">http://nodejs.org</a></div></blockquote></li></ul></li><li>Open a command line terminal and type:<blockquote><div><code>npm install -g tiddlywiki</code></div><div>If it fails with an error you may need to re-run the command as an administrator:</div><div><code>sudo npm install -g tiddlywiki</code> (Mac/Linux)</div></blockquote></li><li>Ensure TiddlyWiki is installed by typing:<blockquote><div><code>tiddlywiki --version</code></div></blockquote><ul><li>In response, you should see <a class="tc-tiddlylink tc-tiddlylink-resolves" href="https://tiddlywiki.com/static/TiddlyWiki.html">TiddlyWiki</a> report its current version (eg "5.2.7". You may also see other debugging information reported.)</li></ul></li><li>Try it out:<ol><li><code>tiddlywiki mynewwiki --init server</code> to create a folder for a new wiki that includes server-related components</li><li><code>tiddlywiki mynewwiki --listen</code> to start <a class="tc-tiddlylink tc-tiddlylink-resolves" href="https://tiddlywiki.com/static/TiddlyWiki.html">TiddlyWiki</a></li><li>Visit <a class="tc-tiddlylink-external" href="http://127.0.0.1:8080/" rel="noopener noreferrer" target="_blank">http://127.0.0.1:8080/</a> in your browser</li><li>Try editing and creating tiddlers</li></ol></li><li>Optionally, make an offline copy:<ul><li>click the <span class="doc-icon"><svg class="tc-image-save-button-dynamic tc-image-button" height="22pt" viewBox="0 0 128 128" width="22pt">
|
||||
<g class="tc-image-save-button-dynamic-clean">
|
||||
<path d="M120.783 34.33c4.641 8.862 7.266 18.948 7.266 29.646 0 35.347-28.653 64-64 64-35.346 0-64-28.653-64-64 0-35.346 28.654-64 64-64 18.808 0 35.72 8.113 47.43 21.03l2.68-2.68c3.13-3.13 8.197-3.132 11.321-.008 3.118 3.118 3.121 8.193-.007 11.32l-4.69 4.691zm-12.058 12.058a47.876 47.876 0 013.324 17.588c0 26.51-21.49 48-48 48s-48-21.49-48-48 21.49-48 48-48c14.39 0 27.3 6.332 36.098 16.362L58.941 73.544 41.976 56.578c-3.127-3.127-8.201-3.123-11.32-.005-3.123 3.124-3.119 8.194.006 11.319l22.617 22.617a7.992 7.992 0 005.659 2.347c2.05 0 4.101-.783 5.667-2.349l44.12-44.12z" fill-rule="evenodd"></path>
|
||||
</g>
|
||||
<g class="tc-image-save-button-dynamic-dirty">
|
||||
<path d="M64.856912,0 C100.203136,0 128.856912,28.653776 128.856912,64 C128.856912,99.346224 100.203136,128 64.856912,128 C29.510688,128 0.856911958,99.346224 0.856911958,64 C0.856911958,28.653776 29.510688,0 64.856912,0 Z M64.856912,16 C38.347244,16 16.856912,37.490332 16.856912,64 C16.856912,90.509668 38.347244,112 64.856912,112 C91.3665799,112 112.856912,90.509668 112.856912,64 C112.856912,37.490332 91.3665799,16 64.856912,16 Z"></path>
|
||||
<circle cx="65" cy="64" r="32"></circle>
|
||||
</g>
|
||||
</svg></span> <strong>save changes</strong> button in the sidebar, <strong>OR</strong></li><li><code>tiddlywiki mynewwiki --build index</code></li></ul></li></ol><p>The <code>-g</code> flag causes <a class="tc-tiddlylink tc-tiddlylink-resolves" href="https://tiddlywiki.com/static/TiddlyWiki.html">TiddlyWiki</a> to be installed globally. Without it, <a class="tc-tiddlylink tc-tiddlylink-resolves" href="https://tiddlywiki.com/static/TiddlyWiki.html">TiddlyWiki</a> will only be available in the directory where you installed it.</p><p><div class="doc-icon-block"><div class="doc-block-icon"><svg class="tc-image-warning tc-image-button" height="22pt" viewBox="0 0 128 128" width="22pt"><path d="M57.072 11c3.079-5.333 10.777-5.333 13.856 0l55.426 96c3.079 5.333-.77 12-6.928 12H8.574c-6.158 0-10.007-6.667-6.928-12l55.426-96zM64 37c-4.418 0-8 3.582-8 7.994v28.012C56 77.421 59.59 81 64 81c4.418 0 8-3.582 8-7.994V44.994C72 40.579 68.41 37 64 37zm0 67a8 8 0 100-16 8 8 0 000 16z" fill-rule="evenodd"></path></svg></div> If you are using Debian or Debian-based Linux and you are receiving a <code>node: command not found</code> error though node.js package is installed, you may need to create a symbolic link between <code>nodejs</code> and <code>node</code>. Consult your distro's manual and <code>whereis</code> to correctly create a link. See github <a class="tc-tiddlylink-external" href="http://github.com/Jermolene/TiddlyWiki5/issues/1434" rel="noopener noreferrer" target="_blank">issue 1434</a>. <br><br>Example Debian v8.0: <code>sudo ln -s /usr/bin/nodejs /usr/bin/node</code></div></p><p><br>
|
||||
<div class="doc-icon-block"><div class="doc-block-icon"><svg class="tc-image-tip tc-image-button" height="22pt" viewBox="0 0 128 128" width="22pt"><path d="M64 128.242c35.346 0 64-28.654 64-64 0-35.346-28.654-64-64-64-35.346 0-64 28.654-64 64 0 35.346 28.654 64 64 64zm11.936-36.789c-.624 4.129-5.73 7.349-11.936 7.349-6.206 0-11.312-3.22-11.936-7.349C54.33 94.05 58.824 95.82 64 95.82c5.175 0 9.67-1.769 11.936-4.366zm0 4.492c-.624 4.13-5.73 7.349-11.936 7.349-6.206 0-11.312-3.22-11.936-7.349 2.266 2.597 6.76 4.366 11.936 4.366 5.175 0 9.67-1.769 11.936-4.366zm0 4.456c-.624 4.129-5.73 7.349-11.936 7.349-6.206 0-11.312-3.22-11.936-7.349 2.266 2.597 6.76 4.366 11.936 4.366 5.175 0 9.67-1.769 11.936-4.366zm0 4.492c-.624 4.13-5.73 7.349-11.936 7.349-6.206 0-11.312-3.22-11.936-7.349 2.266 2.597 6.76 4.366 11.936 4.366 5.175 0 9.67-1.769 11.936-4.366zM64.3 24.242c11.618 0 23.699 7.82 23.699 24.2S75.92 71.754 75.92 83.576c0 5.873-5.868 9.26-11.92 9.26s-12.027-3.006-12.027-9.26C51.973 71.147 40 65.47 40 48.442s12.683-24.2 24.301-24.2z" fill-rule="evenodd"></path></svg></div> You can also install prior versions like this: <br><code> npm install -g tiddlywiki@5.1.13</code></div>
|
||||
</p><h1 class="">Using <a class="tc-tiddlylink tc-tiddlylink-resolves" href="https://tiddlywiki.com/static/TiddlyWiki.html">TiddlyWiki</a> on Node.js</h1><p>TiddlyWiki5 includes a set of commands for use on the command line to perform an extensive set of operations based on <a class="tc-tiddlylink tc-tiddlylink-resolves" href="https://tiddlywiki.com/static/TiddlyWikiFolders.html">TiddlyWikiFolders</a>, <a class="tc-tiddlylink tc-tiddlylink-resolves" href="https://tiddlywiki.com/static/TiddlerFiles.html">TiddlerFiles</a>.</p><p>For example, the following command loads the tiddlers from a TiddlyWiki HTML file and then saves one of them in static HTML:</p><pre><code>tiddlywiki --verbose --load mywiki.html --rendertiddler ReadMe ./readme.html</code></pre><p>Running <code>tiddlywiki</code> from the command line boots the TiddlyWiki kernel, loads the core plugins and establishes an empty wiki store. It then sequentially processes the command line arguments from left to right. The arguments are separated with spaces.</p><p><a class="tc-tiddlylink tc-tiddlylink-resolves doc-from-version" href="https://tiddlywiki.com/static/Release%25205.1.20.html"><svg class="tc-image-warning tc-image-button" height="22pt" viewBox="0 0 128 128" width="22pt"><path d="M57.072 11c3.079-5.333 10.777-5.333 13.856 0l55.426 96c3.079 5.333-.77 12-6.928 12H8.574c-6.158 0-10.007-6.667-6.928-12l55.426-96zM64 37c-4.418 0-8 3.582-8 7.994v28.012C56 77.421 59.59 81 64 81c4.418 0 8-3.582 8-7.994V44.994C72 40.579 68.41 37 64 37zm0 67a8 8 0 100-16 8 8 0 000 16z" fill-rule="evenodd"></path></svg> New in: 5.1.20</a> First, there can be zero or more plugin references identified by the prefix <code>+</code> for plugin names or <code>++</code> for a path to a plugin folder. These plugins are loaded in addition to any specified in the <a class="tc-tiddlylink tc-tiddlylink-resolves" href="https://tiddlywiki.com/static/TiddlyWikiFolders.html">TiddlyWikiFolder</a>.</p><p>The next argument is the optional path to the <a class="tc-tiddlylink tc-tiddlylink-resolves" href="https://tiddlywiki.com/static/TiddlyWikiFolders.html">TiddlyWikiFolder</a> to be loaded. If not present, then the current directory is used.</p><p>The commands and their individual arguments follow, each command being identified by the prefix <code>--</code>.</p><pre><code>tiddlywiki [+<pluginname> | ++<pluginpath>] [<wikipath>] [--<command> [<arg>[,<arg>]]]</code></pre><p>For example:</p><pre><code>tiddlywiki --version
|
||||
tiddlywiki +plugins/tiddlywiki/filesystem +plugins/tiddlywiki/tiddlyweb mywiki --listen
|
||||
|
||||
Reference in New Issue
Block a user