mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2026-06-20 04:08:52 +00:00
Compare commits
44 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 5f213567dd | |||
| a1ab220df6 | |||
| 88d8057b38 | |||
| a4e0cf31b0 | |||
| 4bb12379eb | |||
| 4697718e7b | |||
| a624ed24e2 | |||
| 2059464276 | |||
| 2a3a6dd558 | |||
| e0b7dcded1 | |||
| 478d90acec | |||
| 3aacf0fe72 | |||
| 72c77f42da | |||
| 52907b98f9 | |||
| 9caba544eb | |||
| b1cb211f21 | |||
| 2475e1b501 | |||
| 193628d63f | |||
| ee32eb909f | |||
| b47a3ab585 | |||
| 9e41d410ee | |||
| fc3a764199 | |||
| b6ce353a7d | |||
| 7a50603d9d | |||
| d21fabca4b | |||
| daa9a8ae45 | |||
| d9eb5499a3 | |||
| 870c7897ad | |||
| 95da1c2907 | |||
| 2bfe522b72 | |||
| c099bf9893 | |||
| ab0dda1177 | |||
| 4f65953da9 | |||
| d77de61a06 | |||
| 3287cf56bb | |||
| b5c81d2721 | |||
| d3522854b6 | |||
| 2f3f9de7be | |||
| 6890952357 | |||
| 71be167592 | |||
| 989947b99a | |||
| 3d86d62a6e | |||
| 0cfe6597d4 | |||
| 81b4e99ccc |
@@ -27,10 +27,15 @@ Basics/Tiddlers/Prompt: Number of tiddlers
|
||||
Basics/Title/Prompt: Title of this ~TiddlyWiki
|
||||
Basics/Username/Prompt: Username for signing edits
|
||||
Basics/Version/Prompt: ~TiddlyWiki version
|
||||
Cascades/Caption: Cascades
|
||||
Cascades/Hint: These global rules are used to dynamically choose certain templates. The result of the cascade is the result of the first filter in the sequence that returns a result
|
||||
Cascades/TagPrompt: Filters tagged <$macrocall $name="tag" tag=<<currentTiddler>>/>
|
||||
EditorTypes/Caption: Editor Types
|
||||
EditorTypes/Editor/Caption: Editor
|
||||
EditorTypes/Hint: These tiddlers determine which editor is used to edit specific tiddler types.
|
||||
EditorTypes/Type/Caption: Type
|
||||
EditTemplateBody/Caption: Edit Template Body
|
||||
EditTemplateBody/Hint: This rule cascade is used by the default edit template to dynamically choose the template for editing the body of a tiddler.
|
||||
Info/Caption: Info
|
||||
Info/Hint: Information about this TiddlyWiki
|
||||
KeyboardShortcuts/Add/Prompt: Type shortcut here
|
||||
@@ -191,6 +196,8 @@ Settings/TitleLinks/Yes/Description: Display tiddler titles as links
|
||||
Settings/MissingLinks/Caption: Wiki Links
|
||||
Settings/MissingLinks/Hint: Choose whether to link to tiddlers that do not exist yet
|
||||
Settings/MissingLinks/Description: Enable links to missing tiddlers
|
||||
StoryTiddler/Caption: Story Tiddler
|
||||
StoryTiddler/Hint: This rule cascade is used to dynamically choose the template for displaying a tiddler in the story river.
|
||||
StoryView/Caption: Story View
|
||||
StoryView/Prompt: Current view:
|
||||
Stylesheets/Caption: Stylesheets
|
||||
@@ -201,6 +208,8 @@ Theme/Caption: Theme
|
||||
Theme/Prompt: Current theme:
|
||||
TiddlerFields/Caption: Tiddler Fields
|
||||
TiddlerFields/Hint: This is the full set of TiddlerFields in use in this wiki (including system tiddlers but excluding shadow tiddlers).
|
||||
TiddlerIcon/Caption: Tiddler Icon
|
||||
TiddlerIcon/Hint: This rules cascade is used to dynamically choose the icon for a tiddler.
|
||||
Toolbars/Caption: Toolbars
|
||||
Toolbars/EditToolbar/Caption: Edit Toolbar
|
||||
Toolbars/EditToolbar/Hint: Choose which buttons are displayed for tiddlers in edit mode. Drag and drop to change the ordering
|
||||
@@ -212,3 +221,7 @@ Toolbars/EditorToolbar/Hint: Choose which buttons are displayed in the editor to
|
||||
Toolbars/ViewToolbar/Caption: View Toolbar
|
||||
Toolbars/ViewToolbar/Hint: Choose which buttons are displayed for tiddlers in view mode. Drag and drop to change the ordering
|
||||
Tools/Download/Full/Caption: Download full wiki
|
||||
ViewTemplateBody/Caption: View Template Body
|
||||
ViewTemplateBody/Hint: This rule cascade is used by the default view template to dynamically choose the template for displaying the body of a tiddler.
|
||||
ViewTemplateTitle/Caption: View Template Title
|
||||
ViewTemplateTitle/Hint: This rule cascade is used by the default view template to dynamically choose the template for displaying the title of a tiddler.
|
||||
@@ -205,7 +205,7 @@ FramedEngine.prototype.handleInputEvent = function(event) {
|
||||
this.widget.saveChanges(this.getText());
|
||||
this.fixHeight();
|
||||
if(this.widget.editInputActions) {
|
||||
this.widget.invokeActionString(this.widget.editInputActions);
|
||||
this.widget.invokeActionString(this.widget.editInputActions,this,event,{actionValue: this.getText()});
|
||||
}
|
||||
return true;
|
||||
};
|
||||
|
||||
@@ -133,7 +133,7 @@ SimpleEngine.prototype.handleInputEvent = function(event) {
|
||||
this.widget.saveChanges(this.getText());
|
||||
this.fixHeight();
|
||||
if(this.widget.editInputActions) {
|
||||
this.widget.invokeActionString(this.widget.editInputActions);
|
||||
this.widget.invokeActionString(this.widget.editInputActions,this,event,{actionValue: this.getText()});
|
||||
}
|
||||
return true;
|
||||
};
|
||||
|
||||
@@ -0,0 +1,51 @@
|
||||
/*\
|
||||
title: $:/core/modules/filterrunprefixes/cascade.js
|
||||
type: application/javascript
|
||||
module-type: filterrunprefix
|
||||
\*/
|
||||
(function(){
|
||||
|
||||
/*jslint node: true, browser: true */
|
||||
/*global $tw: false */
|
||||
"use strict";
|
||||
|
||||
/*
|
||||
Export our filter prefix function
|
||||
*/
|
||||
exports.cascade = function(operationSubFunction,options) {
|
||||
return function(results,source,widget) {
|
||||
if(results.length !== 0) {
|
||||
var filterList = operationSubFunction(source,widget),
|
||||
filterFnList = [];
|
||||
var inputResults = results.toArray();
|
||||
results.clear();
|
||||
$tw.utils.each(inputResults,function(title) {
|
||||
var result = ""; // If no filter matches, we return an empty string
|
||||
$tw.utils.each(filterList,function(filter,index) {
|
||||
if(!filterFnList[index]) {
|
||||
filterFnList[index] = options.wiki.compileFilter(filter);
|
||||
}
|
||||
var output = filterFnList[index](options.wiki.makeTiddlerIterator([title]),{
|
||||
getVariable: function(name) {
|
||||
switch(name) {
|
||||
case "currentTiddler":
|
||||
return "" + title;
|
||||
case "..currentTiddler":
|
||||
return widget.getVariable("currentTiddler");
|
||||
default:
|
||||
return widget.getVariable(name);
|
||||
}
|
||||
}
|
||||
});
|
||||
if(output.length !== 0) {
|
||||
result = output[0];
|
||||
return false;
|
||||
}
|
||||
});
|
||||
results.push(result);
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
})();
|
||||
@@ -15,7 +15,8 @@ Export our filter prefix function
|
||||
exports.map = function(operationSubFunction,options) {
|
||||
return function(results,source,widget) {
|
||||
if(results.length > 0) {
|
||||
var inputTitles = results.toArray();
|
||||
var inputTitles = results.toArray(),
|
||||
index = 0;
|
||||
results.clear();
|
||||
$tw.utils.each(inputTitles,function(title) {
|
||||
var filtered = operationSubFunction(options.wiki.makeTiddlerIterator([title]),{
|
||||
@@ -25,12 +26,19 @@ exports.map = function(operationSubFunction,options) {
|
||||
return "" + title;
|
||||
case "..currentTiddler":
|
||||
return widget.getVariable("currentTiddler");
|
||||
case "index":
|
||||
return "" + index;
|
||||
case "revIndex":
|
||||
return "" + (inputTitles.length - 1 - index);
|
||||
case "length":
|
||||
return "" + inputTitles.length;
|
||||
default:
|
||||
return widget.getVariable(name);
|
||||
}
|
||||
}
|
||||
});
|
||||
results.push(filtered[0] || "");
|
||||
++index;
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -103,4 +103,16 @@ exports.nth = function(source,operator,options) {
|
||||
return results.slice(count - 1,count);
|
||||
};
|
||||
|
||||
/*
|
||||
The zero based nth member of the list
|
||||
*/
|
||||
exports.zth = function(source,operator,options) {
|
||||
var count = $tw.utils.getInt(operator.operand,0),
|
||||
results = [];
|
||||
source(function(tiddler,title) {
|
||||
results.push(title);
|
||||
});
|
||||
return results.slice(count,count + 1);
|
||||
};
|
||||
|
||||
})();
|
||||
|
||||
@@ -121,21 +121,23 @@ exports["search-replace"] = function(source,operator,options) {
|
||||
flagSuffix = (suffixes[0] ? (suffixes[0][0] || "") : ""),
|
||||
flags = (flagSuffix.indexOf("g") !== -1 ? "g" : "") + (flagSuffix.indexOf("i") !== -1 ? "i" : "") + (flagSuffix.indexOf("m") !== -1 ? "m" : ""),
|
||||
isRegExp = (suffixes[1] && suffixes[1][0] === "regexp") ? true : false,
|
||||
searchTerm,
|
||||
//Escape regexp characters if the operand is not a regular expression
|
||||
searchTerm = isRegExp ? operator.operand : $tw.utils.escapeRegExp(operator.operand),
|
||||
//Escape $ character in replacement string if not in regular expression mode
|
||||
replacement = isRegExp ? operator.operands[1] : (operator.operands[1]||"").replace(/\$/g,"$$$$"),
|
||||
regExp;
|
||||
try {
|
||||
regExp = new RegExp(searchTerm,flags);
|
||||
} catch(ex) {
|
||||
return ["RegExp error: " + ex];
|
||||
}
|
||||
|
||||
source(function(tiddler,title) {
|
||||
if(title && (operator.operands.length > 1)) {
|
||||
//Escape regexp characters if the operand is not a regular expression
|
||||
searchTerm = isRegExp ? operator.operand : $tw.utils.escapeRegExp(operator.operand);
|
||||
try {
|
||||
regExp = new RegExp(searchTerm,flags);
|
||||
} catch(ex) {
|
||||
return ["RegExp error: " + ex];
|
||||
}
|
||||
results.push(
|
||||
title.replace(regExp,operator.operands[1])
|
||||
title.replace(regExp,replacement)
|
||||
);
|
||||
regExp.lastIndex = 0;
|
||||
} else {
|
||||
results.push(title);
|
||||
}
|
||||
|
||||
@@ -87,7 +87,7 @@ SendMessageWidget.prototype.invokeAction = function(triggeringWidget,event) {
|
||||
param: param,
|
||||
paramObject: paramObject,
|
||||
event: event,
|
||||
currentTiddler: this.getVariable("currentTiddler"),
|
||||
tiddlerTitle: this.getVariable("currentTiddler"),
|
||||
navigateFromTitle: this.getVariable("storyTiddler")
|
||||
};
|
||||
this.dispatchEvent(params);
|
||||
|
||||
@@ -52,7 +52,13 @@ CodeBlockWidget.prototype.execute = function() {
|
||||
Selectively refreshes the widget if needed. Returns true if the widget or any of its children needed re-rendering
|
||||
*/
|
||||
CodeBlockWidget.prototype.refresh = function(changedTiddlers) {
|
||||
return false;
|
||||
var changedAttributes = this.computeAttributes();
|
||||
if(changedAttributes.code || changedAttributes.language) {
|
||||
this.refreshSelf();
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
};
|
||||
|
||||
exports.codeblock = CodeBlockWidget;
|
||||
|
||||
@@ -0,0 +1,96 @@
|
||||
/*\
|
||||
title: $:/core/modules/widgets/let.js
|
||||
type: application/javascript
|
||||
module-type: widget
|
||||
|
||||
This widget allows defining multiple variables at once, while allowing
|
||||
the later variables to depend upon the earlier ones.
|
||||
|
||||
```
|
||||
\define helloworld() Hello world!
|
||||
<$let currentTiddler="target" value={{!!value}} currentTiddler="different">
|
||||
{{!!value}} will be different from <<value>>
|
||||
</$let>
|
||||
```
|
||||
|
||||
\*/
|
||||
(function(){
|
||||
|
||||
/*jslint node: true, browser: true */
|
||||
/*global $tw: false */
|
||||
"use strict";
|
||||
|
||||
var Widget = require("$:/core/modules/widgets/widget.js").widget;
|
||||
|
||||
var LetWidget = function(parseTreeNode,options) {
|
||||
// Initialise
|
||||
this.initialise(parseTreeNode,options);
|
||||
};
|
||||
|
||||
/*
|
||||
Inherit from the base widget class
|
||||
*/
|
||||
LetWidget.prototype = new Widget();
|
||||
|
||||
/*
|
||||
Render this widget into the DOM
|
||||
*/
|
||||
LetWidget.prototype.render = function(parent,nextSibling) {
|
||||
this.parentDomNode = parent;
|
||||
this.computeAttributes();
|
||||
this.execute();
|
||||
this.renderChildren(parent,nextSibling);
|
||||
};
|
||||
|
||||
LetWidget.prototype.computeAttributes = function() {
|
||||
// Before computing attributes, we must make clear that none of the
|
||||
// existing attributes are staged for lookup, even on a refresh
|
||||
var changedAttributes = {},
|
||||
self = this;
|
||||
this.currentValueFor = Object.create(null);
|
||||
$tw.utils.each(this.parseTreeNode.orderedAttributes,function(attribute,index) {
|
||||
var value = self.computeAttribute(attribute),
|
||||
name = attribute.name;
|
||||
if(name.charAt(0) !== "$") {
|
||||
// Now that it's prepped, we're allowed to look this variable up
|
||||
// when defining later variables
|
||||
self.currentValueFor[name] = value;
|
||||
}
|
||||
});
|
||||
// Run through again, setting variables and looking for differences
|
||||
$tw.utils.each(this.currentValueFor,function(value,name) {
|
||||
if (self.attributes[name] !== value) {
|
||||
self.attributes[name] = value;
|
||||
self.setVariable(name,value);
|
||||
changedAttributes[name] = true;
|
||||
}
|
||||
});
|
||||
return changedAttributes;
|
||||
};
|
||||
|
||||
LetWidget.prototype.getVariableInfo = function(name,options) {
|
||||
// Special handling: If this variable exists in this very $let, we can
|
||||
// use it, but only if it's been staged.
|
||||
if ($tw.utils.hop(this.currentValueFor,name)) {
|
||||
return {
|
||||
text: this.currentValueFor[name]
|
||||
};
|
||||
}
|
||||
return Widget.prototype.getVariableInfo.call(this,name,options);
|
||||
};
|
||||
|
||||
/*
|
||||
Refresh the widget by ensuring our attributes are up to date
|
||||
*/
|
||||
LetWidget.prototype.refresh = function(changedTiddlers) {
|
||||
var changedAttributes = this.computeAttributes();
|
||||
if($tw.utils.count(changedAttributes) > 0) {
|
||||
this.refreshSelf();
|
||||
return true;
|
||||
}
|
||||
return this.refreshChildren(changedTiddlers);
|
||||
};
|
||||
|
||||
exports["let"] = LetWidget;
|
||||
|
||||
})();
|
||||
@@ -29,14 +29,12 @@ var VarsWidget = function(parseTreeNode,options) {
|
||||
/*
|
||||
Inherit from the base widget class
|
||||
*/
|
||||
VarsWidget.prototype = Object.create(Widget.prototype);
|
||||
VarsWidget.prototype = new Widget();
|
||||
|
||||
/*
|
||||
Render this widget into the DOM
|
||||
*/
|
||||
VarsWidget.prototype.render = function(parent,nextSibling) {
|
||||
// Call the constructor
|
||||
Widget.call(this);
|
||||
this.parentDomNode = parent;
|
||||
this.computeAttributes();
|
||||
this.execute();
|
||||
@@ -63,7 +61,7 @@ Refresh the widget by ensuring our attributes are up to date
|
||||
*/
|
||||
VarsWidget.prototype.refresh = function(changedTiddlers) {
|
||||
var changedAttributes = this.computeAttributes();
|
||||
if(Object.keys(changedAttributes).length) {
|
||||
if($tw.utils.count(changedAttributes) > 0) {
|
||||
this.refreshSelf();
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -263,19 +263,9 @@ Compute the current values of the attributes of the widget. Returns a hashmap of
|
||||
*/
|
||||
Widget.prototype.computeAttributes = function() {
|
||||
var changedAttributes = {},
|
||||
self = this,
|
||||
value;
|
||||
self = this;
|
||||
$tw.utils.each(this.parseTreeNode.attributes,function(attribute,name) {
|
||||
if(attribute.type === "filtered") {
|
||||
value = self.wiki.filterTiddlers(attribute.filter,self)[0] || "";
|
||||
} else if(attribute.type === "indirect") {
|
||||
value = self.wiki.getTextReference(attribute.textReference,"",self.getVariable("currentTiddler"));
|
||||
} else if(attribute.type === "macro") {
|
||||
value = self.getVariable(attribute.value.name,{params: attribute.value.params});
|
||||
} else { // String attribute
|
||||
value = attribute.value;
|
||||
}
|
||||
// Check whether the attribute has changed
|
||||
var value = self.computeAttribute(attribute);
|
||||
if(self.attributes[name] !== value) {
|
||||
self.attributes[name] = value;
|
||||
changedAttributes[name] = true;
|
||||
@@ -284,6 +274,20 @@ Widget.prototype.computeAttributes = function() {
|
||||
return changedAttributes;
|
||||
};
|
||||
|
||||
Widget.prototype.computeAttribute = function(attribute) {
|
||||
var value;
|
||||
if(attribute.type === "filtered") {
|
||||
value = this.wiki.filterTiddlers(attribute.filter,this)[0] || "";
|
||||
} else if(attribute.type === "indirect") {
|
||||
value = this.wiki.getTextReference(attribute.textReference,"",this.getVariable("currentTiddler"));
|
||||
} else if(attribute.type === "macro") {
|
||||
value = this.getVariable(attribute.value.name,{params: attribute.value.params});
|
||||
} else { // String attribute
|
||||
value = attribute.value;
|
||||
}
|
||||
return value;
|
||||
};
|
||||
|
||||
/*
|
||||
Check for the presence of an attribute
|
||||
*/
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
title: $:/core/ui/ControlPanel/Cascades
|
||||
tags: $:/tags/ControlPanel/Advanced
|
||||
caption: {{$:/language/ControlPanel/Cascades/Caption}}
|
||||
|
||||
{{$:/language/ControlPanel/Cascades/Hint}}
|
||||
|
||||
<div class="tc-control-panel">
|
||||
<$macrocall $name="tabs" tabsList="[all[shadows+tiddlers]tag[$:/tags/ControlPanel/Cascades]!has[draft.of]]" default="$:/core/ui/ControlPanel/StoryTiddler"/>
|
||||
</div>
|
||||
@@ -0,0 +1,9 @@
|
||||
title: $:/core/ui/ControlPanel/EditTemplateBody
|
||||
tags: $:/tags/ControlPanel/Cascade
|
||||
caption: {{$:/language/ControlPanel/EditTemplateBody/Caption}}
|
||||
|
||||
\define lingo-base() $:/language/ControlPanel/EditTemplateBody/
|
||||
|
||||
<<lingo Hint>>
|
||||
|
||||
{{$:/tags/EditTemplateBodyFilter||$:/snippets/ListTaggedCascade}}
|
||||
@@ -0,0 +1,9 @@
|
||||
title: $:/core/ui/ControlPanel/StoryTiddler
|
||||
tags: $:/tags/ControlPanel/Cascades
|
||||
caption: {{$:/language/ControlPanel/StoryTiddler/Caption}}
|
||||
|
||||
\define lingo-base() $:/language/ControlPanel/StoryTiddler/
|
||||
|
||||
<<lingo Hint>>
|
||||
|
||||
{{$:/tags/StoryTiddlerTemplateFilter||$:/snippets/ListTaggedCascade}}
|
||||
@@ -0,0 +1,9 @@
|
||||
title: $:/core/ui/ControlPanel/TiddlerIcon
|
||||
tags: $:/tags/ControlPanel/Cascades
|
||||
caption: {{$:/language/ControlPanel/TiddlerIcon/Caption}}
|
||||
|
||||
\define lingo-base() $:/language/ControlPanel/TiddlerIcon/
|
||||
|
||||
<<lingo Hint>>
|
||||
|
||||
{{$:/tags/TiddlerIconFilter||$:/snippets/ListTaggedCascade}}
|
||||
@@ -0,0 +1,9 @@
|
||||
title: $:/core/ui/ControlPanel/ViewTemplateBody
|
||||
tags: $:/tags/ControlPanel/Cascades
|
||||
caption: {{$:/language/ControlPanel/ViewTemplateBody/Caption}}
|
||||
|
||||
\define lingo-base() $:/language/ControlPanel/ViewTemplateBody/
|
||||
|
||||
<<lingo Hint>>
|
||||
|
||||
{{$:/tags/ViewTemplateBodyFilter||$:/snippets/ListTaggedCascade}}
|
||||
@@ -0,0 +1,9 @@
|
||||
title: $:/core/ui/ControlPanel/ViewTemplateTitle
|
||||
tags: $:/tags/ControlPanel/Cascades
|
||||
caption: {{$:/language/ControlPanel/ViewTemplateTitle/Caption}}
|
||||
|
||||
\define lingo-base() $:/language/ControlPanel/ViewTemplateTitle/
|
||||
|
||||
<<lingo Hint>>
|
||||
|
||||
{{$:/tags/ViewTemplateTitleFilter||$:/snippets/ListTaggedCascade}}
|
||||
@@ -1,54 +1,4 @@
|
||||
title: $:/core/ui/EditTemplate/body
|
||||
tags: $:/tags/EditTemplate
|
||||
|
||||
\define lingo-base() $:/language/EditTemplate/Body/
|
||||
\define config-visibility-title()
|
||||
$:/config/EditorToolbarButtons/Visibility/$(currentTiddler)$
|
||||
\end
|
||||
|
||||
\define importFileActions()
|
||||
<$action-popup $state=<<importState>> $coords="(0,0,0,0)" $floating="yes"/>
|
||||
\end
|
||||
|
||||
<$list filter="[all[current]has[_canonical_uri]]">
|
||||
|
||||
<div class="tc-message-box">
|
||||
|
||||
<<lingo External/Hint>>
|
||||
|
||||
<a href={{!!_canonical_uri}}><$text text={{!!_canonical_uri}}/></a>
|
||||
|
||||
<$edit-text field="_canonical_uri" class="tc-edit-fields" tabindex={{$:/config/EditTabIndex}} cancelPopups="yes"></$edit-text>
|
||||
|
||||
</div>
|
||||
|
||||
</$list>
|
||||
|
||||
<$list filter="[all[current]!has[_canonical_uri]]">
|
||||
<$vars importTitle=<<qualify $:/ImportImage>> importState=<<qualify $:/state/ImportImage>> >
|
||||
<$dropzone importTitle=<<importTitle>> autoOpenOnImport="no" contentTypesFilter={{$:/config/Editor/ImportContentTypesFilter}} class="tc-dropzone-editor" enable={{{ [{$:/config/DragAndDrop/Enable}match[no]] :else[subfilter{$:/config/Editor/EnableImportFilter}then[yes]else[no]] }}} filesOnly="yes" actions=<<importFileActions>> ><$reveal state="$:/state/showeditpreview" type="match" text="yes">
|
||||
<div class="tc-tiddler-preview">
|
||||
|
||||
<$transclude tiddler="$:/core/ui/EditTemplate/body/editor" mode="inline"/>
|
||||
|
||||
<div class="tc-tiddler-preview-preview">
|
||||
|
||||
<$transclude tiddler={{$:/state/editpreviewtype}} mode="inline">
|
||||
|
||||
<$transclude tiddler="$:/core/ui/EditTemplate/body/preview/output" mode="inline"/>
|
||||
|
||||
</$transclude>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</$reveal>
|
||||
|
||||
<$reveal state="$:/state/showeditpreview" type="nomatch" text="yes">
|
||||
|
||||
<$transclude tiddler="$:/core/ui/EditTemplate/body/editor" mode="inline"/>
|
||||
|
||||
</$reveal>
|
||||
</$dropzone>
|
||||
</$vars>
|
||||
</$list>
|
||||
<$transclude tiddler={{{ [<currentTiddler>] :cascade[all[shadows+tiddlers]tag[$:/tags/EditTemplateBodyFilter]get[text]] :and[!is[blank]else[$:/core/ui/EditTemplate/body/default]] }}} />
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
title: $:/core/ui/EditTemplate/body/canonical-uri
|
||||
|
||||
\define lingo-base() $:/language/EditTemplate/Body/
|
||||
|
||||
<div class="tc-message-box">
|
||||
|
||||
<<lingo External/Hint>>
|
||||
|
||||
<a href={{!!_canonical_uri}}><$text text={{!!_canonical_uri}}/></a>
|
||||
|
||||
<$edit-text field="_canonical_uri" class="tc-edit-fields" tabindex={{$:/config/EditTabIndex}} cancelPopups="yes"></$edit-text>
|
||||
|
||||
</div>
|
||||
@@ -0,0 +1,38 @@
|
||||
title: $:/core/ui/EditTemplate/body/default
|
||||
|
||||
\define config-visibility-title()
|
||||
$:/config/EditorToolbarButtons/Visibility/$(currentTiddler)$
|
||||
\end
|
||||
|
||||
\define importFileActions()
|
||||
<$action-popup $state=<<importState>> $coords="(0,0,0,0)" $floating="yes"/>
|
||||
\end
|
||||
|
||||
<$set name="edit-preview-state" value={{{ [{$:/config/ShowEditPreview/PerTiddler}!match[yes]then[$:/state/showeditpreview]] :else[<qualify "$:/state/showeditpreview">] }}}>
|
||||
<$vars importTitle=<<qualify $:/ImportImage>> importState=<<qualify $:/state/ImportImage>> >
|
||||
<$dropzone importTitle=<<importTitle>> autoOpenOnImport="no" contentTypesFilter={{$:/config/Editor/ImportContentTypesFilter}} class="tc-dropzone-editor" enable={{{ [{$:/config/DragAndDrop/Enable}match[no]] :else[subfilter{$:/config/Editor/EnableImportFilter}then[yes]else[no]] }}} filesOnly="yes" actions=<<importFileActions>> ><$reveal stateTitle=<<edit-preview-state>> type="match" text="yes">
|
||||
<div class="tc-tiddler-preview">
|
||||
|
||||
<$transclude tiddler="$:/core/ui/EditTemplate/body/editor" mode="inline"/>
|
||||
|
||||
<div class="tc-tiddler-preview-preview">
|
||||
|
||||
<$transclude tiddler={{$:/state/editpreviewtype}} mode="inline">
|
||||
|
||||
<$transclude tiddler="$:/core/ui/EditTemplate/body/preview/output" mode="inline"/>
|
||||
|
||||
</$transclude>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</$reveal>
|
||||
|
||||
<$reveal stateTitle=<<edit-preview-state>> type="nomatch" text="yes">
|
||||
|
||||
<$transclude tiddler="$:/core/ui/EditTemplate/body/editor" mode="inline"/>
|
||||
|
||||
</$reveal>
|
||||
</$dropzone>
|
||||
</$vars>
|
||||
</$set>
|
||||
@@ -8,11 +8,11 @@ condition: [<targetTiddler>]
|
||||
button-classes: tc-text-editor-toolbar-item-start-group
|
||||
shortcuts: ((preview))
|
||||
|
||||
<$reveal state="$:/state/showeditpreview" type="match" text="yes" tag="span">
|
||||
<$reveal state=<<edit-preview-state>> type="match" text="yes" tag="span">
|
||||
{{$:/core/images/preview-open}}
|
||||
<$action-setfield $tiddler="$:/state/showeditpreview" $value="no"/>
|
||||
<$action-setfield $tiddler=<<edit-preview-state>> $value="no"/>
|
||||
</$reveal>
|
||||
<$reveal state="$:/state/showeditpreview" type="nomatch" text="yes" tag="span">
|
||||
<$reveal state=<<edit-preview-state>> type="nomatch" text="yes" tag="span">
|
||||
{{$:/core/images/preview-closed}}
|
||||
<$action-setfield $tiddler="$:/state/showeditpreview" $value="yes"/>
|
||||
<$action-setfield $tiddler=<<edit-preview-state>> $value="yes"/>
|
||||
</$reveal>
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
title: $:/snippets/ListTaggedCascade
|
||||
|
||||
{{||$:/language/ControlPanel/Cascades/TagPrompt}}
|
||||
|
||||
<ol>
|
||||
<$list filter="[all[shadows+tiddlers]tag<currentTiddler>]">
|
||||
<li>
|
||||
<div>
|
||||
<$link><$text text=<<currentTiddler>>/></$link>
|
||||
</div>
|
||||
<$codeblock code={{!!text}}/>
|
||||
</li>
|
||||
</$list>
|
||||
</ol>
|
||||
@@ -14,7 +14,7 @@ tags: $:/tags/PageTemplate
|
||||
|
||||
</section>
|
||||
|
||||
<$list filter="[list[$:/StoryList]]" history="$:/HistoryList" template={{$:/config/ui/ViewTemplate}} editTemplate={{$:/config/ui/EditTemplate}} storyview={{$:/view}} emptyMessage={{$:/config/EmptyStoryMessage}}/>
|
||||
<$list filter="[list[$:/StoryList]]" history="$:/HistoryList" template="$:/core/ui/StoryTiddlerTemplate" storyview={{$:/view}} emptyMessage={{$:/config/EmptyStoryMessage}}/>
|
||||
|
||||
<section class="story-frontdrop">
|
||||
|
||||
|
||||
@@ -0,0 +1,3 @@
|
||||
title: $:/core/ui/StoryTiddlerTemplate
|
||||
|
||||
<$transclude tiddler={{{ [<currentTiddler>] :cascade[all[shadows+tiddlers]tag[$:/tags/StoryTiddlerTemplateFilter]get[text]] :and[!is[blank]else{$:/config/ui/ViewTemplate}] }}} />
|
||||
@@ -16,7 +16,7 @@ title: $:/core/ui/TagPickerTagTemplate
|
||||
<$set name="backgroundColor" value={{!!color}}>
|
||||
<$wikify name="foregroundColor" text="""<$macrocall $name="contrastcolour" target={{!!color}} fallbackTarget=<<fallbackTarget>> colourA=<<colourA>> colourB=<<colourB>>/>""">
|
||||
<span class="tc-tag-label tc-btn-invisible" style=<<tag-pill-styles>>>
|
||||
<$transclude tiddler={{!!icon}}/><$view field="title" format="text"/>
|
||||
{{||$:/core/ui/TiddlerIcon}}<$view field="title" format="text"/>
|
||||
</span>
|
||||
</$wikify>
|
||||
</$set>
|
||||
|
||||
@@ -3,7 +3,7 @@ title: $:/core/ui/TagTemplate
|
||||
\whitespace trim
|
||||
<span class="tc-tag-list-item" data-tag-title=<<currentTiddler>>>
|
||||
<$set name="transclusion" value=<<currentTiddler>>>
|
||||
<$macrocall $name="tag-pill-body" tag=<<currentTiddler>> icon={{!!icon}} colour={{!!color}} palette={{$:/palette}} element-tag="""$button""" element-attributes="""popup=<<qualify "$:/state/popup/tag">> dragFilter='[all[current]tagging[]]' tag='span'"""/>
|
||||
<$macrocall $name="tag-pill-body" tag=<<currentTiddler>> colour={{!!color}} palette={{$:/palette}} element-tag="""$button""" element-attributes="""popup=<<qualify "$:/state/popup/tag">> dragFilter='[all[current]tagging[]]' tag='span'"""/>
|
||||
<$reveal state=<<qualify "$:/state/popup/tag">> type="popup" position="below" animate="yes" class="tc-drop-down">
|
||||
<$set name="tv-show-missing-links" value="yes">
|
||||
<$transclude tiddler="$:/core/ui/ListItemTemplate"/>
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
title: $:/core/ui/TiddlerIcon
|
||||
|
||||
\whitespace trim
|
||||
\define title-styles()
|
||||
fill:$(foregroundColor)$;
|
||||
\end
|
||||
<$let tiddlerIcon={{{ [<currentTiddler>] :cascade[all[shadows+tiddlers]tag[$:/tags/TiddlerIconFilter]get[text]] }}}>
|
||||
<$list filter="[<tiddlerIcon>!is[blank]]" variable="ignore">
|
||||
<$let foregroundColor={{!!color}}>
|
||||
<span class=<<iconSpanClass>> style=<<title-styles>>>
|
||||
<$transclude tiddler=<<tiddlerIcon>>/>
|
||||
</span>
|
||||
</$let>
|
||||
</$list>
|
||||
</$let>
|
||||
@@ -3,14 +3,6 @@ tags: $:/tags/ViewTemplate
|
||||
|
||||
<$reveal tag="div" class="tc-tiddler-body" type="nomatch" stateTitle=<<folded-state>> text="hide" retain="yes" animate="yes">
|
||||
|
||||
<$list filter="[all[current]!has[plugin-type]!field:hide-body[yes]]">
|
||||
|
||||
<$transclude>
|
||||
|
||||
<$transclude tiddler="$:/language/MissingTiddler/Hint"/>
|
||||
|
||||
</$transclude>
|
||||
|
||||
</$list>
|
||||
<$transclude tiddler={{{ [<currentTiddler>] :cascade[all[shadows+tiddlers]tag[$:/tags/ViewTemplateBodyFilter]get[text]] :and[!is[blank]else[$:/core/ui/ViewTemplate/body/default]] }}} />
|
||||
|
||||
</$reveal>
|
||||
|
||||
@@ -0,0 +1,3 @@
|
||||
title: $:/core/ui/ViewTemplate/body/blank
|
||||
|
||||
<!-- Intentionally blank -->
|
||||
@@ -0,0 +1,3 @@
|
||||
title: $:/core/ui/ViewTemplate/body/code
|
||||
|
||||
<$codeblock code={{{ [<currentTiddler>get[text]] }}} language={{{ [<currentTiddler>get[type]else[text/vnd.tiddlywiki]] }}}/>
|
||||
@@ -0,0 +1,7 @@
|
||||
title: $:/core/ui/ViewTemplate/body/default
|
||||
|
||||
<$transclude>
|
||||
|
||||
<$transclude tiddler="$:/language/MissingTiddler/Hint"/>
|
||||
|
||||
</$transclude>
|
||||
@@ -1,5 +1,4 @@
|
||||
title: $:/core/ui/ViewTemplate/import
|
||||
tags: $:/tags/ViewTemplate
|
||||
title: $:/core/ui/ViewTemplate/body/import
|
||||
|
||||
\define lingo-base() $:/language/Import/
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
title: $:/core/ui/ViewTemplate/body/plugin
|
||||
|
||||
<div class="tc-tiddler-plugin-info">
|
||||
<$let plugin-type={{!!plugin-type}}
|
||||
default-popup-state="yes"
|
||||
qualified-state=<<qualify "$:/state/plugin-info">>
|
||||
>
|
||||
{{||$:/core/ui/Components/plugin-info}}
|
||||
</$let>
|
||||
</div>
|
||||
@@ -1,15 +0,0 @@
|
||||
title: $:/core/ui/ViewTemplate/plugin
|
||||
tags: $:/tags/ViewTemplate
|
||||
|
||||
<$reveal tag="div" class="tc-tiddler-plugin-info" type="nomatch" stateTitle=<<folded-state>> text="hide" retain="yes" animate="yes">
|
||||
|
||||
<$list filter="[all[current]has[plugin-type]] -[all[current]field:plugin-type[import]]">
|
||||
<$set name="plugin-type" value={{!!plugin-type}}>
|
||||
<$set name="default-popup-state" value="yes">
|
||||
<$set name="qualified-state" value=<<qualify "$:/state/plugin-info">>>
|
||||
{{||$:/core/ui/Components/plugin-info}}
|
||||
</$set>
|
||||
</$set>
|
||||
</$set>
|
||||
</$list>
|
||||
</$reveal>
|
||||
@@ -2,9 +2,6 @@ title: $:/core/ui/ViewTemplate/title
|
||||
tags: $:/tags/ViewTemplate
|
||||
|
||||
\whitespace trim
|
||||
\define title-styles()
|
||||
fill:$(foregroundColor)$;
|
||||
\end
|
||||
<div class="tc-tiddler-title">
|
||||
<div class="tc-titlebar">
|
||||
<span class="tc-tiddler-controls">
|
||||
@@ -12,25 +9,10 @@ fill:$(foregroundColor)$;
|
||||
</span>
|
||||
<$set name="tv-wikilinks" value={{$:/config/Tiddlers/TitleLinks}}>
|
||||
<$link>
|
||||
<$set name="foregroundColor" value={{!!color}}>
|
||||
<$list filter="[all[current]has[icon]]~[[$:/config/DefaultTiddlerIcon]has[text]]">
|
||||
<span class="tc-tiddler-title-icon" style=<<title-styles>>>
|
||||
<$transclude tiddler={{!!icon}}>
|
||||
<$transclude tiddler={{$:/config/DefaultTiddlerIcon}}/>
|
||||
</$transclude>
|
||||
</span>
|
||||
</$list>
|
||||
</$set>
|
||||
<$list filter="[all[current]removeprefix[$:/]]">
|
||||
<h2 class="tc-title" title={{$:/language/SystemTiddler/Tooltip}}>
|
||||
<span class="tc-system-title-prefix">$:/</span><$text text=<<currentTiddler>>/>
|
||||
</h2>
|
||||
</$list>
|
||||
<$list filter="[all[current]!prefix[$:/]]">
|
||||
<h2 class="tc-title">
|
||||
<$view field="title"/>
|
||||
</h2>
|
||||
</$list>
|
||||
<$let iconSpanClass="tc-tiddler-title-icon">
|
||||
{{||$:/core/ui/TiddlerIcon}}
|
||||
</$let>
|
||||
<$transclude tiddler={{{ [<currentTiddler>] :cascade[all[shadows+tiddlers]tag[$:/tags/ViewTemplateTitleFilter]get[text]] :and[!is[blank]else[$:/core/ui/ViewTemplate/title/default]] }}} />
|
||||
</$link>
|
||||
</$set>
|
||||
</div>
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
title: $:/core/ui/ViewTemplate/title/default
|
||||
|
||||
\whitespace trim
|
||||
<h2 class="tc-title">
|
||||
<$view field="title"/>
|
||||
</h2>
|
||||
@@ -0,0 +1,6 @@
|
||||
title: $:/core/ui/ViewTemplate/title/system
|
||||
|
||||
\whitespace trim
|
||||
<h2 class="tc-title" title={{$:/language/SystemTiddler/Tooltip}}>
|
||||
<span class="tc-system-title-prefix">$:/</span><$text text={{{ [<currentTiddler>removeprefix[$:/]] }}}/>
|
||||
</h2>
|
||||
@@ -0,0 +1,5 @@
|
||||
title: $:/config/EditTemplateBodyFilters/
|
||||
tags: $:/tags/EditTemplateBodyFilter
|
||||
|
||||
canonical-uri: [has[_canonical_uri]then[$:/core/ui/EditTemplate/body/canonical-uri]]
|
||||
default: [[$:/core/ui/EditTemplate/body/default]]
|
||||
@@ -0,0 +1,5 @@
|
||||
title: $:/config/StoryTiddlerTemplateFilters/
|
||||
tags: $:/tags/StoryTiddlerTemplateFilter
|
||||
|
||||
draft: [is[draft]then{$:/config/ui/EditTemplate}]
|
||||
default: [{$:/config/ui/ViewTemplate}]
|
||||
@@ -0,0 +1,5 @@
|
||||
title: $:/config/TiddlerIconFilters/
|
||||
tags: $:/tags/TiddlerIconFilter
|
||||
|
||||
icon-field: [has[icon]then{!!icon}]
|
||||
default: [{$:/config/DefaultTiddlerIcon}has[text]]
|
||||
@@ -0,0 +1,8 @@
|
||||
title: $:/config/ViewTemplateBodyFilters/
|
||||
tags: $:/tags/ViewTemplateBodyFilter
|
||||
|
||||
system: [prefix[$:/boot/]] [prefix[$:/config/]] [prefix[$:/core/]!field:title[$:/core/readme]!field:title[$:/core/icon]] [prefix[$:/info/]] [prefix[$:/language/]] [prefix[$:/languages/]] [prefix[$:/snippets/]] [prefix[$:/state/]] [prefix[$:/status/]] [prefix[$:/info/]] [prefix[$:/temp/]] +[limit[1]then[$:/core/ui/ViewTemplate/body/code]]
|
||||
import: [field:plugin-type[import]then[$:/core/ui/ViewTemplate/body/import]]
|
||||
plugin: [has[plugin-type]then[$:/core/ui/ViewTemplate/body/plugin]]
|
||||
hide-body: [field:hide-body[yes]then[$:/core/ui/ViewTemplate/body/blank]]
|
||||
default: [[$:/core/ui/ViewTemplate/body/default]]
|
||||
@@ -0,0 +1,5 @@
|
||||
title: $:/config/ViewTemplateTitleFilters/
|
||||
tags: $:/tags/ViewTemplateTitleFilter
|
||||
|
||||
system: [prefix[$:/]then[$:/core/ui/ViewTemplate/title/system]]
|
||||
default: [[$:/core/ui/ViewTemplate/title/default]]
|
||||
@@ -10,18 +10,18 @@ color:$(foregroundColor)$;
|
||||
\define tag-pill-inner(tag,icon,colour,fallbackTarget,colourA,colourB,element-tag,element-attributes,actions)
|
||||
<$vars foregroundColor=<<contrastcolour target:"""$colour$""" fallbackTarget:"""$fallbackTarget$""" colourA:"""$colourA$""" colourB:"""$colourB$""">> backgroundColor="""$colour$""">
|
||||
<$element-tag$ $element-attributes$ class="tc-tag-label tc-btn-invisible" style=<<tag-pill-styles>>>
|
||||
$actions$<$transclude tiddler="""$icon$"""/><$view tiddler=<<__tag__>> field="title" format="text" />
|
||||
$actions${{||$:/core/ui/TiddlerIcon}}<$view tiddler=<<__tag__>> field="title" format="text" />
|
||||
</$element-tag$>
|
||||
</$vars>
|
||||
\end
|
||||
|
||||
\define tag-pill-body(tag,icon,colour,palette,element-tag,element-attributes,actions)
|
||||
<$macrocall $name="tag-pill-inner" tag=<<__tag__>> icon="""$icon$""" colour="""$colour$""" fallbackTarget={{$palette$##tag-background}} colourA={{$palette$##foreground}} colourB={{$palette$##background}} element-tag="""$element-tag$""" element-attributes="""$element-attributes$""" actions="""$actions$"""/>
|
||||
<$macrocall $name="tag-pill-inner" tag=<<__tag__>> colour="""$colour$""" fallbackTarget={{$palette$##tag-background}} colourA={{$palette$##foreground}} colourB={{$palette$##background}} element-tag="""$element-tag$""" element-attributes="""$element-attributes$""" actions="""$actions$"""/>
|
||||
\end
|
||||
|
||||
\define tag-pill(tag,element-tag:"span",element-attributes:"",actions:"")
|
||||
<span class="tc-tag-list-item" data-tag-title=<<__tag__>>>
|
||||
<$macrocall $name="tag-pill-body" tag=<<__tag__>> icon={{{ [<__tag__>get[icon]] }}} colour={{{ [<__tag__>get[color]] }}} palette={{$:/palette}} element-tag="""$element-tag$""" element-attributes="""$element-attributes$""" actions="""$actions$"""/>
|
||||
<$macrocall $name="tag-pill-body" tag=<<__tag__>> colour={{{ [<__tag__>get[color]] }}} palette={{$:/palette}} element-tag="""$element-tag$""" element-attributes="""$element-attributes$""" actions="""$actions$"""/>
|
||||
</span>
|
||||
\end
|
||||
|
||||
|
||||
@@ -0,0 +1,2 @@
|
||||
title: $:/tags/EditTemplateBodyFilter
|
||||
list: $:/config/EditTemplateBodyFilters/canonical-uri $:/config/EditTemplateBodyFilters/default
|
||||
@@ -0,0 +1,2 @@
|
||||
title: $:/tags/StoryTiddlerTemplateFilter
|
||||
list: $:/config/StoryTiddlerTemplateFilters/draft $:/config/StoryTiddlerTemplateFilters/default
|
||||
@@ -0,0 +1,3 @@
|
||||
title: $:/tags/TiddlerIconFilter
|
||||
list: $:/config/TiddlerIconFilters/icon-field $:/config/TiddlerIconFilters/default
|
||||
|
||||
@@ -0,0 +1,3 @@
|
||||
title: $:/tags/ViewTemplateBodyFilter
|
||||
list: $:/config/ViewTemplateBodyFilters/system $:/config/ViewTemplateBodyFilters/import $:/config/ViewTemplateBodyFilters/plugin $:/config/ViewTemplateBodyFilters/hide-body $:/config/ViewTemplateBodyFilters/default
|
||||
|
||||
@@ -0,0 +1,3 @@
|
||||
title: $:/tags/ViewTemplateTitleFilter
|
||||
list: $:/config/ViewTemplateTitleFilters/system $:/config/ViewTemplateTitleFilters/default
|
||||
|
||||
@@ -19,19 +19,28 @@ type: text/vnd.tiddlywiki
|
||||
|
||||
! Usability Improvements
|
||||
|
||||
*
|
||||
* <<.link-badge-fixed "https://github.com/Jermolene/TiddlyWiki5/pull/6015">> image picker in theme tweaks to not dismiss when an image is selected
|
||||
* <<.link-badge-added "https://github.com/Jermolene/TiddlyWiki5/pull/5998">> a [[new hidden setting|Hidden Setting: Show Edit Preview per Tiddler]] for controlling the visibility of the editor preview pane on a per-tiddler basis
|
||||
|
||||
! Widget Improvements
|
||||
|
||||
*
|
||||
* <<.link-badge-added "https://github.com/Jermolene/TiddlyWiki5/pull/6148">> new LetWidget, a more flexible alternative to the SetWidget and the VarsWidget
|
||||
|
||||
! Filter improvements
|
||||
|
||||
*
|
||||
* <<.link-badge-added "https://github.com/Jermolene/TiddlyWiki5/pull/6150">> new [[zth Operator]] that works like [[nth Operator]] but counts from zero instead of one
|
||||
* <<.link-badge-extended "https://github.com/Jermolene/TiddlyWiki5/pull/6149">> [[Map Filter Run Prefix]] to provide additional variables to the filter
|
||||
|
||||
! Hackability Improvements
|
||||
|
||||
*
|
||||
* <<.link-badge-added "https://github.com/Jermolene/TiddlyWiki5/pull/6012/files">> new `focus-editor` operation to [[WidgetMessage: tm-edit-text-operation]]
|
||||
* <<.link-badge-added "https://github.com/Jermolene/TiddlyWiki5/pull/6130">> new ActionSetMultipleFieldsWidget, new SetMultipleVariablesWidget and extended ActionSendMessageWidget for working with multiple variables/fields/indexes/parameters in one operation
|
||||
* <<.link-badge-added "https://github.com/Jermolene/TiddlyWiki5/pull/6127">> new trigonometric operators: [[acos|acos Operator]], [[asin|asin Operator]], [[atan|atan Operator]], [[cos|cos Operator]], [[sin|sin Operator]] and [[tan|tan Operator]]
|
||||
* <<.link-badge-extended "https://github.com/Jermolene/TiddlyWiki5/pull/6145">> EditTextWidget to provide a new ''actionValue'' variable to action strings that contains the value of the input
|
||||
|
||||
! Developer Improvements
|
||||
|
||||
* <<.link-badge-added "https://github.com/Jermolene/TiddlyWiki5/pull/6132">> support for widgets to access the order in which attributes are defined
|
||||
|
||||
! Client-server Improvements
|
||||
|
||||
@@ -39,7 +48,7 @@ type: text/vnd.tiddlywiki
|
||||
|
||||
! Node.js Improvements
|
||||
|
||||
*
|
||||
* <<.link-badge-added "https://github.com/Jermolene/TiddlyWiki5/pull/5275">> support for recursively loading subdirectories with [[tiddlywiki.files Files]]
|
||||
|
||||
! Plugin Improvements
|
||||
|
||||
@@ -49,14 +58,25 @@ type: text/vnd.tiddlywiki
|
||||
|
||||
! Translation improvements
|
||||
|
||||
*
|
||||
* Polish
|
||||
|
||||
! Other Bug Fixes
|
||||
|
||||
*
|
||||
* <<.link-badge-fixed "https://github.com/Jermolene/TiddlyWiki5/pull/6013">> refreshing of LinkWidget attributes
|
||||
* <<.link-badge-fixed "https://github.com/Jermolene/TiddlyWiki5/pull/6107">> crash when using "source=basename-uri-decoded" in tiddlywiki.files
|
||||
* <<.link-badge-fixed "https://github.com/Jermolene/TiddlyWiki5/commit/8ae4428332e03a1fdaee26f777a0c3a372fff401">> ''$timestamp'' attribute ignored when using ActionSetFieldWidget to set the value of an index
|
||||
|
||||
! 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:
|
||||
|
||||
* <<contributor Jermolene>>
|
||||
* <<contributor btheado>>
|
||||
* <<contributor BurningTreeC>>
|
||||
* <<contributor EvidentlyCube>>
|
||||
* <<contributor flibbles>>
|
||||
* <<contributor joshuafontany>>
|
||||
* <<contributor Marxsal>>
|
||||
* <<contributor pmario>>
|
||||
* <<contributor saqimtiaz>>
|
||||
* <<contributor Telumire>>
|
||||
|
||||
|
||||
@@ -815,6 +815,10 @@ Tests the filtering mechanism.
|
||||
expect(wiki.filterTiddlers("[[Unlike conventional online services, TiddlyWiki lets you choose where to keep your data\nUnlike conventional online services, TiddlyWiki lets you choose where to keep your data\nUnlike conventional online services, TiddlyWiki lets you choose where to keep your data\nUnlike conventional online services, TiddlyWiki lets you choose where to keep your data]search-replace:g:regexp<myregexp2>,[]]",anchorWidget).join(",")).toBe("conventional online services, TiddlyWiki lets you choose where to keep your data\nUnlike conventional online services, TiddlyWiki lets you choose where to keep your data\nUnlike conventional online services, TiddlyWiki lets you choose where to keep your data\nUnlike conventional online services, TiddlyWiki lets you choose where to keep your data");
|
||||
expect(wiki.filterTiddlers("[[Unlike conventional online services, TiddlyWiki lets you choose where to keep your data\nUnlike conventional online services, TiddlyWiki lets you choose where to keep your data\nUnlike conventional online services, TiddlyWiki lets you choose where to keep your data\nUnlike conventional online services, TiddlyWiki lets you choose where to keep your data]search-replace:gm:regexp<myregexp2>,[]]",anchorWidget).join(",")).toBe("conventional online services, TiddlyWiki lets you choose where to keep your data\nconventional online services, TiddlyWiki lets you choose where to keep your data\nconventional online services, TiddlyWiki lets you choose where to keep your data\nconventional online services, TiddlyWiki lets you choose where to keep your data");
|
||||
expect(wiki.filterTiddlers("[[Hello There\nUnlike conventional online services, TiddlyWiki lets you choose where to keep your data\nguaranteeing that in the decades to come you will still be able to use the notes you take today.]search-replace:gm:regexp<myregexp3>,[]]",anchorWidget).join(",")).toBe("\nUnlike conventional online services, TiddlyWiki lets you choose where to keep your data\n");
|
||||
expect(wiki.filterTiddlers("[[This is equation $$x$$ end.]search-replace[equation $$x$$ end.],[relation $$x$$ finish.]]").join(",")).toBe("This is relation $$x$$ finish.");
|
||||
expect(wiki.filterTiddlers("[[This is an amazing TiddlyWiki]] [[How old is TiddlyWiki?. TiddlyWiki is great]] [[My TiddlyWiki is so fast.]] +[search-replace:g:regexp[TiddlyWiki],[TW]]").join(",")).toBe("This is an amazing TW,How old is TW?. TW is great,My TW is so fast.");
|
||||
expect(wiki.filterTiddlers("[[This is an amazing TiddlyWiki]] [[How old is TiddlyWiki?. TiddlyWiki is great]] [[My TiddlyWiki is so fast.]] +[search-replace::regexp[TiddlyWiki],[TW]]").join(",")).toBe("This is an amazing TW,How old is TW?. TiddlyWiki is great,My TW is so fast.");
|
||||
expect(wiki.filterTiddlers("[[This is an amazing TiddlyWiki]] [[How old is TiddlyWiki?. TiddlyWiki is great]] [[My TiddlyWiki is so fast.]] +[search-replace:g[TiddlyWiki],[TW]]").join(",")).toBe("This is an amazing TW,How old is TW?. TW is great,My TW is so fast.");
|
||||
});
|
||||
|
||||
it("should handle the pad operator", function() {
|
||||
|
||||
@@ -288,6 +288,38 @@ describe("'reduce' and 'intersection' filter prefix tests", function() {
|
||||
tags: ["cakes","with tea"],
|
||||
text: "Does anyone eat pound cake?"
|
||||
});
|
||||
wiki.addTiddler({
|
||||
title: "$:/filter1",
|
||||
text: "[tag[cakes]then[It is customary]]",
|
||||
tags: "$:/tags/Filter $:/tags/SecondFilter"
|
||||
});
|
||||
wiki.addTiddler({
|
||||
title: "$:/filter2",
|
||||
text: "[<currentTiddler>tag[shopping]then[It is not customary]]",
|
||||
tags: "$:/tags/Filter $:/tags/SecondFilter"
|
||||
});
|
||||
wiki.addTiddler({
|
||||
title: "$:/filter3",
|
||||
text: "[[Just a default]]",
|
||||
tags: "$:/tags/Filter"
|
||||
});
|
||||
wiki.addTiddler({
|
||||
title: "$:/tags/Filter",
|
||||
list: "$:/filter1 $:/filter2 $:/filter3"
|
||||
});
|
||||
wiki.addTiddler({
|
||||
title: "$:/tags/SecondFilter",
|
||||
list: "$:/filter1 $:/filter2"
|
||||
});
|
||||
|
||||
it("should handle the :cascade filter prefix", function() {
|
||||
expect(wiki.filterTiddlers("[[Rice Pudding]] :cascade[all[shadows+tiddlers]tag[$:/tags/Filter]get[text]]").join(",")).toBe("It is not customary");
|
||||
expect(wiki.filterTiddlers("[[chocolate cake]] :cascade[all[shadows+tiddlers]tag[$:/tags/Filter]get[text]]").join(",")).toBe("It is customary");
|
||||
expect(wiki.filterTiddlers("[[Sparkling water]] :cascade[all[shadows+tiddlers]tag[$:/tags/Filter]get[text]]").join(",")).toBe("Just a default");
|
||||
expect(wiki.filterTiddlers("[[Rice Pudding]] :cascade[all[shadows+tiddlers]tag[$:/tags/SecondFilter]get[text]]").join(",")).toBe("It is not customary");
|
||||
expect(wiki.filterTiddlers("[[chocolate cake]] :cascade[all[shadows+tiddlers]tag[$:/tags/SecondFilter]get[text]]").join(",")).toBe("It is customary");
|
||||
expect(wiki.filterTiddlers("[[Sparkling water]] :cascade[all[shadows+tiddlers]tag[$:/tags/SecondFilter]get[text]]").join(",")).toBe("");
|
||||
});
|
||||
|
||||
it("should handle the :reduce filter prefix", function() {
|
||||
expect(wiki.filterTiddlers("[tag[shopping]] :reduce[get[quantity]add<accumulator>]").join(",")).toBe("22");
|
||||
@@ -384,6 +416,8 @@ describe("'reduce' and 'intersection' filter prefix tests", function() {
|
||||
expect(wiki.filterTiddlers("[tag[shopping]] :map[get[description]else{!!title}]").join(",")).toBe("A square of rich chocolate cake,a round yellow seed,Milk,Rice Pudding");
|
||||
// Return the first title from :map if the filter returns more than one result
|
||||
expect(wiki.filterTiddlers("[tag[shopping]] :map[tags[]]").join(",")).toBe("shopping,shopping,shopping,shopping");
|
||||
// Prepend the position in the list using the index and length variables
|
||||
expect(wiki.filterTiddlers("[tag[shopping]] :map[get[title]addprefix[-]addprefix<length>addprefix[of]addprefix<index>]").join(",")).toBe("0of4-Brownies,1of4-Chick Peas,2of4-Milk,3of4-Rice Pudding");
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
@@ -247,6 +247,40 @@ describe("Widget module", function() {
|
||||
expect(wrapper.children[0].children[2].sequenceNumber).toBe(4);
|
||||
});
|
||||
|
||||
it("should deal with the let widget", function() {
|
||||
var wiki = new $tw.Wiki();
|
||||
wiki.addTiddlers([
|
||||
{title: "TiddlerOne", text: "lookup"},
|
||||
{title: "TiddlerTwo", lookup: "value", newlookup: "value", wrong: "wrong"},
|
||||
{title: "TiddlerThree", text: "wrong", value: "Happy Result", wrong: "ALL WRONG!!"}
|
||||
]);
|
||||
var text="\\define macro() TiddlerThree\n"+
|
||||
"\\define currentTiddler() TiddlerOne\n"+
|
||||
"<$let "+
|
||||
"field={{!!text}} "+
|
||||
"currentTiddler='TiddlerTwo' "+
|
||||
"field={{{ [all[current]get<field>] }}} "+
|
||||
"currentTiddler=<<macro>>>"+
|
||||
"<$transclude field=<<field>>/></$let>";
|
||||
var widgetNode = createWidgetNode(parseText(text,wiki),wiki);
|
||||
var wrapper = renderWidgetNode(widgetNode);
|
||||
expect(wrapper.innerHTML).toBe("<p>Happy Result</p>");
|
||||
|
||||
// This is important. $Let needs to be aware enough not to let its
|
||||
// own variables interfere with its ability to recognize no change.
|
||||
// Doesn't matter that nothing has changed, we just need to make sure
|
||||
// it recognizes that that its outward facing variables are unchanged
|
||||
// EVEN IF some intermediate variables did change, there's no need to
|
||||
// refresh.
|
||||
wiki.addTiddler({title: "TiddlerOne", text: "newlookup"});
|
||||
expect(widgetNode.refresh({})).toBe(false);
|
||||
|
||||
// But if we make a change that might result in different outfacing
|
||||
// variables, then it should refresh
|
||||
wiki.addTiddler({title: "TiddlerOne", text: "badlookup"});
|
||||
expect(widgetNode.refresh({})).toBe(true);
|
||||
});
|
||||
|
||||
it("should deal with attributes specified as macro invocations", function() {
|
||||
var wiki = new $tw.Wiki();
|
||||
// Construct the widget node
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
created: 20211013132515594
|
||||
modified: 20211018102307833
|
||||
tags: Learning
|
||||
title: Icon Gallery
|
||||
type: text/vnd.tiddlywiki
|
||||
|
||||
\define copyActions() <$action-sendmessage $message="tm-copy-to-clipboard" $param=<<imageTitle>>/>
|
||||
|
||||
<<.tip "Click an icon to copy the title to the clipboard">>
|
||||
|
||||
<div class="tc-image-chooser">
|
||||
<$macrocall $name="image-picker-list" filter="[all[shadows+tiddlers]tag[$:/tags/Image]]" actions=<<copyActions>> />
|
||||
</div>
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
created: 20211031174746965
|
||||
modified: 20211031181800684
|
||||
title: MessageHandlerWidgets
|
||||
type: text/vnd.tiddlywiki
|
||||
|
||||
Message handler widgets are those widgets which can react to one or more [[widget messages|Messages]].
|
||||
|
||||
<<.tip "Widget messages are similar to low-level DOM events, except they are higher-level and specific to TiddlyWiki. To handle DOM events see the EventCatcherWidget">>
|
||||
|
||||
The following message handler widgets are provided:
|
||||
|
||||
<<list-links "[tag[MessageHandlerWidgets]]">>
|
||||
@@ -0,0 +1,12 @@
|
||||
created: 20211031172716741
|
||||
modified: 20211031174029381
|
||||
title: TriggeringWidgets
|
||||
type: text/vnd.tiddlywiki
|
||||
|
||||
Triggering widgets are a type of widget which can trigger ActionWidgets. Typically these widgets (such as the ButtonWidget) will trigger actions based on interaction from the user.
|
||||
|
||||
The following triggering widgets are provided:
|
||||
|
||||
<<list-links "[tag[TriggeringWidgets]]">>
|
||||
|
||||
See ActionWidgets for more information and examples of how TriggeringWidgets and ActionWidgets work together.
|
||||
+9
@@ -0,0 +1,9 @@
|
||||
title: Demo Tiddler List with Custom Story Tiddler Template
|
||||
tags: $:/tags/TiddlerList
|
||||
filter: HelloThere Community GettingStarted Features Reference Plugins Learning
|
||||
|
||||
This is a demo tiddler with a custom story tiddler template. See [[Story Tiddler Templates]] for details.
|
||||
|
||||
Click to close this tiddler: {{||$:/core/ui/Buttons/close}}
|
||||
|
||||
Click to edit this tiddler: {{||$:/core/ui/Buttons/edit}}
|
||||
+31
@@ -0,0 +1,31 @@
|
||||
title: $:/_tw5.com/CustomStoryTiddlerTemplateDemo/Styles
|
||||
tags: $:/tags/Stylesheet
|
||||
|
||||
.tc-custom-tiddler-template {
|
||||
border: 3px solid <<colour muted-foreground>>;
|
||||
border-radius: 1em;
|
||||
margin-bottom: 1em;
|
||||
}
|
||||
|
||||
.tc-custom-tiddler-template-inner {
|
||||
background: <<colour muted-foreground>>;
|
||||
padding: 1em;
|
||||
}
|
||||
|
||||
.tc-custom-tiddler-template-list {
|
||||
position: relative;
|
||||
height: 33vh;
|
||||
}
|
||||
|
||||
.tc-custom-tiddler-template-list .tc-custom-tiddler-template-list-item {
|
||||
position: absolute;
|
||||
width: 100%;
|
||||
transform-origin: 50% 0;
|
||||
top: 50px;
|
||||
left: 0;
|
||||
<<box-shadow "0px 0px 15px rgba(0, 0, 0, 0.3)">>
|
||||
}
|
||||
|
||||
.tc-custom-tiddler-template-list .tc-custom-tiddler-template-list-item .tc-tiddler-frame {
|
||||
margin: 0;
|
||||
}
|
||||
+22
@@ -0,0 +1,22 @@
|
||||
title: $:/_tw5.com/CustomStoryTiddlerTemplateDemo/Template
|
||||
|
||||
\define list-item-styles()
|
||||
transform: translate($(left)$%,$(top)$%) scale(0.3) rotate($(angle)$deg);
|
||||
\end
|
||||
|
||||
<div class="tc-custom-tiddler-template">
|
||||
<div class="tc-custom-tiddler-template-inner">
|
||||
<$transclude mode="block"/>
|
||||
</div>
|
||||
<div class="tc-custom-tiddler-template-list">
|
||||
<$let numItems={{{ [subfilter{!!filter}count[]] }}} angleIncrement={{{ [[45]divide<numItems>] }}} posIncrement={{{ [[90]divide<numItems>] }}}>
|
||||
<$list filter={{!!filter}} counter="counter">
|
||||
<$let angle={{{ [<counter>subtract[1]multiply<angleIncrement>subtract[22.5]] }}} left={{{ [<counter>subtract[1]multiply<posIncrement>subtract[45]] }}} top={{{ 0 }}}>
|
||||
<div class="tc-custom-tiddler-template-list-item" style=<<list-item-styles>>>
|
||||
{{||$:/core/ui/ViewTemplate}}
|
||||
</div>
|
||||
</$let>
|
||||
</$list>
|
||||
</$let>
|
||||
</div>
|
||||
</div>
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
title: $:/_tw5.com/CustomStoryTiddlerTemplateDemo/Filter
|
||||
tags: $:/tags/StoryTiddlerTemplateFilter
|
||||
list-before: $:/config/StoryTiddlerTemplateFilters/default
|
||||
|
||||
[tag[$:/tags/TiddlerList]then[$:/_tw5.com/CustomStoryTiddlerTemplateDemo/Template]]
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
title: $:/_tw5.com/CustomTiddlerIconCascadeDemo
|
||||
tags: $:/tags/TiddlerIconFilter
|
||||
|
||||
[tag[TableOfContents]then[$:/core/images/globe]]
|
||||
[tag[Working with TiddlyWiki]then[$:/core/images/help]]
|
||||
@@ -1,22 +1,11 @@
|
||||
created: 20140809113603449
|
||||
modified: 20150520161451179
|
||||
modified: 20211022195248529
|
||||
tags: Learning
|
||||
title: ImageGallery Example
|
||||
type: text/vnd.tiddlywiki
|
||||
|
||||
Here is an example of using the ListWidget and the TranscludeWidget to show a grid of all system images (ie, tiddlers tagged [[$:/tags/Image]]).
|
||||
<<.warning "The [[ImageGallery Example]] has been replaced with the new [[Icon Gallery]] which is transcluded below">>
|
||||
|
||||
<style>
|
||||
.my-gallery svg {
|
||||
width: 6em;
|
||||
height: 6em;
|
||||
margin: 1em;
|
||||
}
|
||||
</style>
|
||||
<div class="my-gallery">
|
||||
<$list filter="[all[tiddlers+shadows]tag[$:/tags/Image]]">
|
||||
<span title=<<currentTiddler>>>
|
||||
<$transclude/>
|
||||
</span>
|
||||
</$list>
|
||||
</div>
|
||||
---
|
||||
|
||||
{{Icon Gallery}}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
created: 20140206214608586
|
||||
modified: 20180701185417525
|
||||
modified: 20211009145417525
|
||||
tags: Features
|
||||
title: LazyLoading
|
||||
type: text/vnd.tiddlywiki
|
||||
@@ -11,7 +11,7 @@ Lazy loading can be used in two configurations:
|
||||
* When running [[TiddlyWiki on Node.js]], just image tiddlers or all non-system tiddlers can be subject to lazy loading
|
||||
* When running [[TiddlyWiki in the Sky for TiddlyWeb]], all tiddlers are subject to lazy loading
|
||||
|
||||
See the LazyLoadingMechanism for details of how lazy loading is implemented.
|
||||
See the [[Lazy Loading Mechanism|https://tiddlywiki.com/dev/#LazyLoadingMechanism]] for details of how lazy loading is implemented.
|
||||
|
||||
! Lazy loading under Node.js
|
||||
|
||||
@@ -28,4 +28,3 @@ To apply lazy loading to all non-system tiddlers use this command:
|
||||
```
|
||||
tiddlywiki --listen root-tiddler=$:/core/save/lazy-all
|
||||
```
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@ modified: 20210506130322593
|
||||
op-input: ignored
|
||||
op-output: the title of each available deserializer
|
||||
op-parameter: none
|
||||
tags: [[Filter Operators]] [[Special Operators]]
|
||||
tags: [[Filter Operators]] [[Special Operators]] [[Selection Constructors]]
|
||||
title: deserializers Operator
|
||||
type: text/vnd.tiddlywiki
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@ op-output: the titles stored as a [[title list|Title List]] in each input title
|
||||
op-purpose: select titles by interpreting each input title as a [[title list|Title List]]
|
||||
op-suffix: `dedupe` (the default) to remove duplicates, `raw` to leave duplicates untouched
|
||||
op-suffix-name: D
|
||||
tags: [[Filter Operators]] [[String Operators]] [[Selection Constructors]]
|
||||
tags: [[Filter Operators]] [[String Operators]]
|
||||
title: enlist-input Operator
|
||||
type: text/vnd.tiddlywiki
|
||||
|
||||
|
||||
@@ -18,4 +18,4 @@ Cycle through a list of values to add as a tag, in reverse order:
|
||||
|
||||
<<.using-days-of-week>>
|
||||
<<.operator-example 1 """[list[Days of the Week]first[]] +[cycle{Days of the Week!!list}]""">>
|
||||
<<.operator-example 1 """[list[Days of the Week]first[]] +[cycle{Days of the Week!!list},[2]]""">>
|
||||
<<.operator-example 2 """[list[Days of the Week]first[]] +[cycle{Days of the Week!!list},[2]]""">>
|
||||
|
||||
@@ -11,4 +11,4 @@ Logarithm of `100` with base `10`:
|
||||
<<.operator-example 2 "[[100]log[10]]">>
|
||||
|
||||
Natural logarithm of 10 (base `e`), equivalent to `ln(10)` in mathematics:
|
||||
<<.operator-example 2 "[[10]log[]]">>
|
||||
<<.operator-example 3 "[[10]log[]]">>
|
||||
|
||||
@@ -5,4 +5,4 @@ title: match Operator (Examples)
|
||||
type: text/vnd.tiddlywiki
|
||||
|
||||
<<.operator-example 1 "a b c +[match[b]]">>
|
||||
<<.operator-example 1 "[match[HelloThere]]">>
|
||||
<<.operator-example 2 "[match[HelloThere]]">>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
created: 20201107112846692
|
||||
modified: 20201118103305351
|
||||
modified: 20211101125225197
|
||||
tags: [[Operator Examples]] [[search-replace Operator]]
|
||||
title: search-replace Operator (Examples)
|
||||
type: text/vnd.tiddlywiki
|
||||
@@ -25,8 +25,14 @@ You can also use regular expression capture groups in the replacement string:
|
||||
`\define names() (\w+)\s(\w+)`
|
||||
<<.operator-example 4 """[[John Smith]search-replace::regexp<names>,[$2,$1]]""" >>
|
||||
|
||||
You can reference the portion of the input that matches the regular expression with `$&`:
|
||||
<<.operator-example 5 """[[John Smith]search-replace::regexp[John .*],[His name is $&]]""">>
|
||||
|
||||
<<.operator-example 6 """[[This is an exciting feature]search-replace::regexp[exciting],[amazing and $&]]""">>
|
||||
|
||||
To replace everything but a match using a regular expression and the ''multiline'' (m) flag:
|
||||
`\define myregexp2() ^(?!Unlike).*$`
|
||||
<<.operator-example 5 """[[HelloThere]get[text]search-replace:gm:regexp<myregexp2>,[]]""">>
|
||||
<<.operator-example 7 """[[HelloThere]get[text]search-replace:gm:regexp<myregexp2>,[]]""">>
|
||||
|
||||
|
||||
{{How to remove stop words}}
|
||||
|
||||
@@ -1,8 +1,30 @@
|
||||
created: 20181031175129475
|
||||
modified: 20181031175129475
|
||||
modified: 20211030223407188
|
||||
tags: [[subfilter Operator]] [[Operator Examples]]
|
||||
title: subfilter Operator (Examples)
|
||||
type: text/vnd.tiddlywiki
|
||||
|
||||
<<.operator-example 1 "[subfilter[one two three]addsuffix[!]]">>
|
||||
<<.operator-example 2 "[subfilter{$:/StoryList!!list}]">>
|
||||
\define recent-mods() [has[modified]!sort[modified]limit[5]]
|
||||
\define display-variable(name)
|
||||
''<$text text=<<__name__>>/>'': <code><$text text={{{ [<__name__>getvariable[]] }}}/></code>
|
||||
\end
|
||||
|
||||
Literal filter operands can be used, but such cases are better rewritten without using <<.op subfilter>>:
|
||||
<<.operator-example 1 "[subfilter[one two three]addsuffix[!]]" "same as `one two three +[addsuffix[!]]`">>
|
||||
|
||||
The <<.op subfilter>> operator can be used to dynamically define parts of a [[filter run|Filter Run]]. This is useful for sharing a common pieces of a filter across multiple filters.
|
||||
|
||||
For example, this variable:
|
||||
|
||||
* <<display-variable recent-mods>>
|
||||
|
||||
can be used in one filter like this:
|
||||
|
||||
<<.operator-example 2 "[tag[Filter Operators]subfilter<recent-mods>addsuffix[!]]" "same as `[tag[Filter Operators]has[modified]!sort[modified]limit[5]addsuffix[!]]`">>
|
||||
|
||||
and in another similar filter like this:
|
||||
<<.operator-example 3 "[tag[ActionWidgets]subfilter<recent-mods>addprefix[!]]">>
|
||||
|
||||
Variables are not the only way to define dynamic subfilters. [[Text references|TextReference]] can be used to load a subfilter from a tiddler field (see also [[Filter Parameter]]):
|
||||
<<.operator-example 4 "[subfilter{$:/StoryList!!list}limit[5]]">>
|
||||
<<.operator-example 5 "[subfilter{$:/StoryList!!list}subfilter<recent-mods>]">>
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
created: 20211029023246203
|
||||
modified: 20211029023559616
|
||||
tags: [[Operator Examples]] [[zth Operator]]
|
||||
title: zth Operator (Examples)
|
||||
type: text/vnd.tiddlywiki
|
||||
|
||||
<<.using-days-of-week>>
|
||||
|
||||
<<.operator-example 1 "[list[Days of the Week]zth[]]">>
|
||||
<<.operator-example 2 "[list[Days of the Week]zth[5]]">>
|
||||
@@ -1,15 +1,17 @@
|
||||
caption: nth
|
||||
created: 20150122204111000
|
||||
modified: 20150203192048000
|
||||
modified: 20211029023739450
|
||||
op-input: a [[selection of titles|Title Selection]]
|
||||
op-output: the <<.place N>>th input title
|
||||
op-parameter: an integer, defaulting to 1
|
||||
op-parameter-name: N
|
||||
op-purpose: select the <<.place N>>th input title
|
||||
tags: [[Filter Operators]] [[Order Operators]]
|
||||
title: nth Operator
|
||||
type: text/vnd.tiddlywiki
|
||||
caption: nth
|
||||
op-purpose: select the <<.place N>>th input title
|
||||
op-input: a [[selection of titles|Title Selection]]
|
||||
op-parameter: an integer, defaulting to 1
|
||||
op-parameter-name: N
|
||||
op-output: the <<.place N>>th input title
|
||||
|
||||
<<.place N>> is one-based. In other words, `nth[1]` has the same effect as the <<.olink first>> operator.
|
||||
|
||||
<<.tip "See <<.olink zth>> for an equivalent operator with a 0 based parameter">>
|
||||
|
||||
<<.operator-examples "nth">>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
created: 20171221184734665
|
||||
modified: 20210907170339891
|
||||
tags: [[Filter Operators]] [[Negatable Operators]]
|
||||
tags: [[Filter Operators]] [[Negatable Operators]] [[Selection Constructors]]
|
||||
title: range Operator
|
||||
type: text/vnd.tiddlywiki
|
||||
caption: range
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
created: 20150126141718000
|
||||
modified: 20150203191420000
|
||||
tags: [[Filter Operators]] [[Special Operators]]
|
||||
tags: [[Filter Operators]] [[Special Operators]] [[Selection Constructors]]
|
||||
title: storyviews Operator
|
||||
type: text/vnd.tiddlywiki
|
||||
caption: storyviews
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
caption: subfilter
|
||||
created: 20181031175129475
|
||||
modified: 20181031175129475
|
||||
modified: 20211030223407188
|
||||
op-input: a [[selection of titles|Title Selection]] passed as input to the subfilter
|
||||
op-neg-input: a [[selection of titles|Title Selection]] passed as input to the subfilter
|
||||
op-neg-output: those input titles that are <<.em not>> returned from the subfilter <<.place S>>
|
||||
@@ -12,7 +12,7 @@ tags: [[Filter Operators]] [[Field Operators]] [[Selection Constructors]] [[Nega
|
||||
title: subfilter Operator
|
||||
type: text/vnd.tiddlywiki
|
||||
|
||||
<<.from-version "5.1.18">> Note that the subfilter operator was introduced in version 5.1.18 and is not available in earlier versions.
|
||||
<<.from-version "5.1.18">> Note that the <<.op subfilter>> operator was introduced in version 5.1.18 and is not available in earlier versions.
|
||||
|
||||
<<.tip " Literal filter operands cannot contain square brackets but you can work around the issue by using a variable:">>
|
||||
|
||||
@@ -24,4 +24,6 @@ type: text/vnd.tiddlywiki
|
||||
|
||||
<<.tip "Compare with the similar [[filter|filter Operator]] operator which runs a subfilter against each title, returning those titles that return a non-empty list (and discards the results of the subfilter)">>
|
||||
|
||||
The <<.op subfilter>> operator will act as a [[constructor|Selection Constructors]] whenever the filter defined by its operand is a [[constructor|Selection Constructors]]. Otherwise, it will act as a [[modifier|Selection Constructors]].
|
||||
|
||||
<<.operator-examples "subfilter">>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
created: 20210618134753828
|
||||
modified: 20210618140945870
|
||||
modified: 20211029082538212
|
||||
tags: [[Filter Syntax]] [[Filter Run Prefix Examples]] [[Map Filter Run Prefix]]
|
||||
title: Map Filter Run Prefix (Examples)
|
||||
type: text/vnd.tiddlywiki
|
||||
@@ -14,3 +14,6 @@ Replace the input titles with the caption field if it exists, otherwise preserve
|
||||
For each title in a shopping list, calculate the total cost of purchasing each item:
|
||||
|
||||
<<.operator-example 2 "[tag[shopping]] :map[get[quantity]else[0]multiply{!!price}]">>
|
||||
|
||||
For each title in a shopping list, prefix it with its position in the list:
|
||||
<<.operator-example 2 "[tag[shopping]] :map[<currentTiddler>addprefix[-]addprefix<index>]">>
|
||||
@@ -1,5 +1,5 @@
|
||||
created: 20210618133745003
|
||||
modified: 20210618134747652
|
||||
modified: 20211029025541750
|
||||
tags: [[Filter Syntax]] [[Filter Run Prefix]]
|
||||
title: Map Filter Run Prefix
|
||||
type: text/vnd.tiddlywiki
|
||||
@@ -14,6 +14,14 @@ Each input title from previous runs is passed to this run in turn. The filter ru
|
||||
|
||||
Note that within the filter run, the "currentTiddler" variable is set to the title of the tiddler being processed. This permits filter runs like `:map[{!!price}multiply{!!cost}]` to be used for computation. The value of currentTiddler outside the run is available in the variable "..currentTiddler".
|
||||
|
||||
The following variables are available within the filter run:
|
||||
|
||||
* ''currentTiddler'' - the input title
|
||||
* ''..currentTiddler'' - the value of the variable `currentTiddler` outside the filter run.
|
||||
* ''index'' - <<.from-version "5.2.1">> the numeric index of the current list item (with zero being the first item in the list).
|
||||
* ''revIndex'' - <<.from-version "5.2.1">> the reverse numeric index of the current list item (with zero being the last item in the list).
|
||||
* ''length'' - <<.from-version "5.2.1">> the total length of the input list.
|
||||
|
||||
Filter runs used with the `:map` prefix should return the same number of items that they are passed. Any missing entries will be treated as an empty string. In particular, when retrieving the value of a field with the [[get Operator]] it is helpful to guard against a missing field value using the [[else Operator]]. For example `[get[myfield]else[default-value]...`.
|
||||
|
||||
[[Examples|Map Filter Run Prefix (Examples)]]
|
||||
@@ -0,0 +1,18 @@
|
||||
caption: zth
|
||||
created: 20211029023242012
|
||||
modified: 20211029023711450
|
||||
op-input: a [[selection of titles|Title Selection]]
|
||||
op-output: the <<.place Z>>th input title
|
||||
op-parameter: an integer, defaulting to 0
|
||||
op-parameter-name: Z
|
||||
op-purpose: select the <<.place Z>>th input title
|
||||
tags: [[Filter Operators]] [[Order Operators]]
|
||||
title: zth Operator
|
||||
type: text/vnd.tiddlywiki
|
||||
|
||||
<<.from-version 5.2.1>>
|
||||
<<.place Z>> is zero-based. In other words, `zth[0]` has the same effect as `nth[1]` and the <<.olink first>> operator.
|
||||
|
||||
<<.tip "See <<.olink nth>> for an equivalent operator with a 1 based parameter">>
|
||||
|
||||
<<.operator-examples "zth">>
|
||||
+2
-2
@@ -1,5 +1,5 @@
|
||||
created: 20140904090300000
|
||||
modified: 20160602051709631
|
||||
modified: 20211018102355896
|
||||
tags: HelloThere
|
||||
title: Some of the things you can do with TiddlyWiki
|
||||
type: text/vnd.tiddlywiki
|
||||
@@ -11,7 +11,7 @@ type: text/vnd.tiddlywiki
|
||||
* Inventory just about anything: your recipes, personal library, contacts, music collection, and more
|
||||
* Create a blog or website
|
||||
* Write a book
|
||||
* Organise your images into galleries (see our [[ImageGallery Example]])
|
||||
* Organise your images into galleries (see [[Icon Gallery]])
|
||||
* Share the information in your ~TiddlyWiki with others, as an online file, as a file attachment, as a tiddler file, or as a link to a specific online tiddler (try clicking and dragging a tiddler from one ~TiddlyWiki file to another to see what happens)
|
||||
* Draw a sketch (Edit [[Motovun Jack.jpg]] and start drawing over the image to see what happens)
|
||||
* Use familiar web user interface elements such as lightboxes - see SampleWizard
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
created: 20211028083211182
|
||||
modified: 20211029090311444
|
||||
tags: [[Hidden Settings]]
|
||||
title: Hidden Setting: Show Edit Preview per Tiddler
|
||||
|
||||
Controls whether the [[tiddler editing preview|Text preview]] is controlled globally (the default) or on a per-tiddler basis.
|
||||
|
||||
Set it to ''yes'' to enable per-tiddler mode.
|
||||
|
||||
$:/config/ShowEditPreview/PerTiddler
|
||||
@@ -1,5 +1,5 @@
|
||||
created: 20201216182347597
|
||||
modified: 20201217193318816
|
||||
modified: 20211018102328148
|
||||
tags:
|
||||
title: How to create dynamic editor toolbar buttons
|
||||
type: text/vnd.tiddlywiki
|
||||
@@ -86,7 +86,7 @@ This tiddler contains all the necessary elements that are important for toolbar
|
||||
: Is used as the button tooltip
|
||||
|
||||
; icon
|
||||
: Assigns the button icon. We use `$:/core/images/spiral` {{$:/core/images/spiral}} here.
|
||||
: Assigns the button icon. We use `$:/core/images/spiral` {{$:/core/images/spiral}} here. More button icons can be found in the [[Icon Gallery]]
|
||||
|
||||
; shortcuts
|
||||
: This is the [[Keyboard Shortcut Descriptor]] eg: `((temp-bold))`
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
created: 20160817104110857
|
||||
modified: 20160817104802841
|
||||
modified: 20211029090145708
|
||||
tags: [[Editor toolbar]]
|
||||
title: Text preview
|
||||
|
||||
Pressing the eye icon {{$:/core/ui/EditorToolbar/preview}} will open or close a preview window for your WikiText (The icon-eye will also open or close).
|
||||
Pressing the eye icon {{$:/core/ui/EditorToolbar/preview}} will open or close a preview window showing the results of rendering the WikiText (the icon-eye will also open or close).
|
||||
|
||||
Right to the eye there is another icon, {{$:/core/images/chevron-down}}, which when clicked, shows you a dropdown which gives you access to six different types of preview:
|
||||
|
||||
@@ -12,3 +12,7 @@ Right to the eye there is another icon, {{$:/core/images/chevron-down}}, which w
|
||||
* //parsetree// and //widgettree// show you the two object trees that ~TiddlyWiki internally generates from ~WikiText. The //parsetree// collects basic information about your ~WikiText. From the informations of the parsetree the //widgettree// then generates extended informations and finally the above html (and the widgettree also does other things).
|
||||
* //differences from current// shows you the differences since the tiddler was last saved. Deleted parts are <span style="color:red;">red</span>, added parts are <span style="color:green;">green</span>.
|
||||
* //differences from shadow (if any)// does the same, but this time it shows you the differences to the underlying [[shadow-tiddler|ShadowTiddlers]].
|
||||
|
||||
<<.tip "By default, the preview pane button controls whether the preview pane is displayed for all tiddlers that are open for editing. There is a [[hidden setting|Hidden Setting: Show Edit Preview per Tiddler]] to make the button work on a per-tiddler basis">>
|
||||
|
||||
<<.tip "The variable [[tv-tiddler-preview|tv-tiddler-preview Variable]] can be used to detect whether content is being displayed in the preview pane.">>
|
||||
@@ -1,5 +1,5 @@
|
||||
created: 20140617211749290
|
||||
modified: 20140912141809800
|
||||
modified: 20211104172343220
|
||||
tags: [[TiddlyWiki on Node.js]]
|
||||
title: Environment Variables on Node.js
|
||||
type: text/vnd.tiddlywiki
|
||||
@@ -11,7 +11,9 @@ type: text/vnd.tiddlywiki
|
||||
* `TIDDLYWIKI_LANGUAGE_PATH` - Search path for languages
|
||||
* `TIDDLYWIKI_EDITION_PATH` - Search path for editions (used by the InitCommand)
|
||||
|
||||
''Note'': The delimiter may vary between operating systems. While on Windows a semicolon `;` is used, Linux implements a colon `:`.
|
||||
''Note 1'': The delimiter may vary between operating systems. While on Windows a semicolon `;` is used, Linux implements a colon `:`.
|
||||
|
||||
''Note 2'': On Linux systems, it may be necessary to //''export''// the variable as well as to define it.
|
||||
|
||||
The additional paths should each point to folders structured like the equivalent directories in the TiddlyWiki5 GitHub repository: the plugin, theme and language directories contain `publisher/pluginname/<files>` while the edition directories contain `editionname/<files>`
|
||||
|
||||
|
||||
@@ -110,6 +110,9 @@ td svg {
|
||||
padding-bottom: 0;
|
||||
margin-top: 0.2em;
|
||||
}
|
||||
.doc-example input {
|
||||
width: 60%;
|
||||
}
|
||||
.doc-example pre:first-child {
|
||||
margin-top: 0;
|
||||
}
|
||||
|
||||
@@ -5,22 +5,29 @@ tags: $:/tags/Macro
|
||||
|
||||
\define .operator-examples(op,text:"Examples") <$link to="$op$ Operator (Examples)">$text$</$link>
|
||||
|
||||
\define .operator-example-tryit-actions() <$action-setfield $tiddler=<<.state>> text="show" filter=<<__eg__>>/>
|
||||
\define .operator-example(n,eg,ie)
|
||||
<div class="doc-example">
|
||||
`$eg$`
|
||||
<$macrocall $name=".if" cond="""$ie$""" then="""<dd>→ $ie$</dd>"""/>
|
||||
<$list filter="[title<.state-prefix>addsuffix{!!title}addsuffix[/]addsuffix[$n$]]" variable=".state">
|
||||
<$reveal state=<<.state>> type="nomatch" text="show">
|
||||
`$eg$`
|
||||
<$macrocall $name=".if" cond="""$ie$""" then="""<dd>→ $ie$</dd>"""/>
|
||||
<dl>
|
||||
<dd><$button set=<<.state>> setTo="show">Try it</$button></dd>
|
||||
<dd><$button actions=<<.operator-example-tryit-actions>>>Try it</$button></dd>
|
||||
</dl>
|
||||
</$reveal>
|
||||
<$reveal state=<<.state>> type="match" text="show">
|
||||
<$edit-text tiddler=<<.state>> field="filter" tag="input" type=search focus="true"/>
|
||||
<dl>
|
||||
<dd><$button set=<<.state>> setTo="">Hide</$button></dd>
|
||||
<dd>
|
||||
<$button set=<<.state>> setTo="">Hide</$button>
|
||||
<$reveal stateTitle=<<.state>> stateField="filter" type="nomatch" text=<<__eg__>>>
|
||||
<$button actions=<<.operator-example-tryit-actions>>>Reset</$button>
|
||||
</$reveal>
|
||||
</dd>
|
||||
</dl>
|
||||
<blockquote class="doc-example-result">
|
||||
<ul><$list filter="""$eg$""" emptyMessage="(empty)">
|
||||
<ul><$list filter={{{[<.state>get[filter]]}}} emptyMessage="(empty)">
|
||||
<li><$link><$view field="title"/></$link></li>
|
||||
</$list></ul>
|
||||
</blockquote>
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
caption: $:/tags/Image
|
||||
created: 20180926170345251
|
||||
description: marks (core) images
|
||||
modified: 20180926171456494
|
||||
modified: 20211018102336342
|
||||
tags: SystemTags
|
||||
title: SystemTag: $:/tags/Image
|
||||
type: text/vnd.tiddlywiki
|
||||
|
||||
The [[system tag|SystemTags]] `$:/tags/Image` marks (core) images
|
||||
The [[system tag|SystemTags]] `$:/tags/Image` marks core images. An overview of system icons can be found in the [[Icon Gallery]]
|
||||
@@ -19,7 +19,7 @@ The ''action-sendmessage'' widget is invisible. Any content within it is ignored
|
||||
|$name |Optional name of additional parameter |
|
||||
|$value |Value for optional parameter whose name is specified in `$name` |
|
||||
|$names |<<.from-version "5.2.1">> Optional filter evaluating to a list of additional parameter names |
|
||||
|$values |<<.from-version "5.2.1">> Optional filter evaluating to a list of parameter values corresponding to the parameters names specified in `$names` |
|
||||
|$values |<<.from-version "5.2.1">> Optional filter evaluating to a list of parameter values corresponding to the parameters names specified in `$names` |
|
||||
|//{any attributes not starting with $}// |Multiple additional, optional named parameters that are attached to the message |
|
||||
|
||||
! Examples
|
||||
|
||||
@@ -26,6 +26,6 @@ Here is an example of button that uses the data in [[Days of the Week]] to assig
|
||||
|
||||
<$macrocall $name='wikitext-example-without-html'
|
||||
src='<$button>
|
||||
<$action-setmultiplefields $tiddler="HelloThere" $fields="[list[Days of the Week]addprefix[day-]]" $values="[list[Days of the Week]]">>/>
|
||||
<$action-setmultiplefields $tiddler="HelloThere" $fields="[list[Days of the Week]addprefix[day-]]" $values="[list[Days of the Week]]"/>
|
||||
Click me!
|
||||
</$button>'/>
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
title: ActionWidget Execution Modes
|
||||
modified: 20211026094722447
|
||||
created: 20211003094722447
|
||||
|
||||
<<.from-version "5.2.0">> The default behaviour of action widgets has some peculiarities that often cause confusion. There is now an improved mode that simplifies how things work, but due to BackwardsCompatibility constraints, it must be explicitly engaged in order to take advantage of it.
|
||||
|
||||
@@ -21,9 +23,9 @@ Current value of ActionTestTiddler: {{ActionTestTiddler}}
|
||||
Click me
|
||||
</$button>'/>
|
||||
|
||||
The new behaviour avoids these problems by refreshing all widgets before execution, not just action widgets. It is engaged by running the actions in a scopr that includes the variable `tv-action-refresh-policy` set to the value `always`.
|
||||
The new behaviour avoids these problems by refreshing all widgets before execution, not just action widgets. It is engaged by running the actions in a scope that includes the variable `tv-action-refresh-policy` set to the value `always`. (The default value for `tv-action-refresh-policy` is `once`).
|
||||
|
||||
This can be done within an action string, or via a local variable declaration containing the widget triggering the action.
|
||||
The assignment can be done within an action string, or via a local variable declaration containing the widget triggering the action.
|
||||
|
||||
<<.warning "Do not attempt to set `tv-action-refresh-policy` globally; the core will only work correctly with the default setting">>
|
||||
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
created: 20141008134425548
|
||||
modified: 20210630163127249
|
||||
modified: 20211031172913375
|
||||
tags: Widgets
|
||||
title: ActionWidgets
|
||||
type: text/vnd.tiddlywiki
|
||||
|
||||
Action widgets are a special type of widget that have no visual appearance but perform an action when triggered (such as sending a message, navigating to a tiddler, or changing the value of a tiddler). Action widgets are used in association with other widgets that trigger those actions (for example, the ButtonWidget).
|
||||
Action widgets are a special type of widget that have no visual appearance but perform an action when triggered (such as sending a message, navigating to a tiddler, or changing the value of a tiddler). Action widgets are used in association with other widgets that [[trigger those actions|TriggeringWidgets]] (for example, the ButtonWidget).
|
||||
|
||||
The following action widgets are provided:
|
||||
|
||||
@@ -17,7 +17,7 @@ There are two ways to use action widgets:
|
||||
|
||||
!! Using action string attributes
|
||||
|
||||
The action widgets are passed as a string to the `actions` attribute of the triggering widget. Usually, it is more convenient to use a macro to assign the action widgets to a variable. For example, here is a button that triggers two actions of sending different messages:
|
||||
The action widgets are passed as a string to the `actions` attribute of the [[triggering widget|TriggeringWidgets]]. Usually, it is more convenient to use a macro to assign the action widgets to a variable. For example, here is a button that triggers two actions of sending different messages:
|
||||
|
||||
```
|
||||
\define my-actions()
|
||||
@@ -32,7 +32,7 @@ Click me!
|
||||
|
||||
!! Directly embedding action widgets
|
||||
|
||||
The action widgets need not be immediate children of their triggering widget, but they must be descendents of it. The actions are performed in sequence. Here is the above example rewritten to use embedding:
|
||||
The action widgets need not be immediate children of their [[triggering widget|TriggeringWidgets]], but they must be descendents of it. The actions are performed in sequence. Here is the above example rewritten to use embedding:
|
||||
|
||||
```
|
||||
<$button>
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
caption: button
|
||||
created: 20131024141900000
|
||||
modified: 20201108183908170
|
||||
tags: Widgets
|
||||
modified: 20211009121239795
|
||||
tags: Widgets TriggeringWidgets
|
||||
title: ButtonWidget
|
||||
type: text/vnd.tiddlywiki
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
caption: checkbox
|
||||
created: 20131024141900000
|
||||
modified: 20201109090732190
|
||||
tags: Widgets
|
||||
modified: 20211009121239806
|
||||
tags: Widgets TriggeringWidgets
|
||||
title: CheckboxWidget
|
||||
type: text/vnd.tiddlywiki
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
caption: draggable
|
||||
created: 20170406081938627
|
||||
modified: 20210912141544224
|
||||
tags: Widgets
|
||||
modified: 20211009122105437
|
||||
tags: Widgets TriggeringWidgets
|
||||
title: DraggableWidget
|
||||
type: text/vnd.tiddlywiki
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
caption: droppable
|
||||
created: 20170406082820317
|
||||
modified: 20200317142604572
|
||||
tags: Widgets
|
||||
modified: 20211009122023265
|
||||
tags: Widgets TriggeringWidgets
|
||||
title: DroppableWidget
|
||||
type: text/vnd.tiddlywiki
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
caption: dropzone
|
||||
created: 20131024141900000
|
||||
modified: 20210506115809131
|
||||
tags: Widgets
|
||||
modified: 20211009122205481
|
||||
tags: Widgets TriggeringWidgets
|
||||
title: DropzoneWidget
|
||||
type: text/vnd.tiddlywiki
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
caption: edit-text
|
||||
created: 20131024141900000
|
||||
modified: 20211021091910134
|
||||
tags: Widgets
|
||||
tags: Widgets TriggeringWidgets
|
||||
title: EditTextWidget
|
||||
type: text/vnd.tiddlywiki
|
||||
|
||||
@@ -33,7 +33,7 @@ The content of the `<$edit-text>` widget is ignored.
|
||||
|minHeight |Minimum height for automatically resized `textarea` editors, specified in CSS length units such as "px", "em" or "%" |
|
||||
|rows|Sets the rows attribute of a generated textarea |
|
||||
|cancelPopups |<<.from-version "5.1.23">> if set to "yes", cancels all popups when the input gets focus |
|
||||
|inputActions |<<.from-version 5.1.23>> Optional actions that are triggered every time an input event occurs within the input field or textarea |
|
||||
|inputActions |<<.from-version 5.1.23>> Optional actions that are triggered every time an input event occurs within the input field or textarea.<br><<.from-version "5.2.1">> The variable `actionValue` is available to the `inputActions` and contains the value of the input field. |
|
||||
|refreshTitle |<<.from-version 5.1.23>> An optional tiddler title that makes the input field update whenever the specified tiddler changes |
|
||||
|disabled|<<.from-version "5.1.23">> Optional, disables the text input if set to "yes". Defaults to "no"|
|
||||
|fileDrop|<<.from-version "5.2.0">> Optional. When set to "yes" allows dropping or pasting images into the editor to import them. Defaults to "no"|
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
caption: edit
|
||||
created: 20131024141900000
|
||||
modified: 20201130184647904
|
||||
tags: Widgets
|
||||
modified: 20211009121634055
|
||||
tags: Widgets TriggeringWidgets
|
||||
title: EditWidget
|
||||
type: text/vnd.tiddlywiki
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
created: 20201123113532200
|
||||
modified: 20210805083352068
|
||||
tags: Widgets
|
||||
modified: 20211031180336257
|
||||
tags: Widgets TriggeringWidgets
|
||||
title: EventCatcherWidget
|
||||
type: text/vnd.tiddlywiki
|
||||
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
caption: fieldmangler
|
||||
created: 20131024141900000
|
||||
modified: 20150220161229000
|
||||
tags: Widgets
|
||||
modified: 20211009122821085
|
||||
tags: Widgets MessageHandlerWidgets
|
||||
title: FieldManglerWidget
|
||||
type: text/vnd.tiddlywiki
|
||||
caption: fieldmangler
|
||||
|
||||
! Introduction
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
caption: keyboard
|
||||
created: 20140302192136805
|
||||
modified: 20210612101618855
|
||||
tags: Widgets
|
||||
modified: 20211009121239821
|
||||
tags: Widgets TriggeringWidgets
|
||||
title: KeyboardWidget
|
||||
type: text/vnd.tiddlywiki
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user