mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2024-10-03 01:10:45 +00:00
Merge branch 'master' into demo-alternate-store
This commit is contained in:
commit
8399538814
32
core/modules/filterrunprefixes/then.js
Normal file
32
core/modules/filterrunprefixes/then.js
Normal file
@ -0,0 +1,32 @@
|
|||||||
|
/*\
|
||||||
|
title: $:/core/modules/filterrunprefixes/then.js
|
||||||
|
type: application/javascript
|
||||||
|
module-type: filterrunprefix
|
||||||
|
|
||||||
|
Replace results of previous runs unless empty
|
||||||
|
|
||||||
|
\*/
|
||||||
|
(function(){
|
||||||
|
|
||||||
|
/*jslint node: true, browser: true */
|
||||||
|
/*global $tw: false */
|
||||||
|
"use strict";
|
||||||
|
|
||||||
|
/*
|
||||||
|
Export our filter prefix function
|
||||||
|
*/
|
||||||
|
exports.then = function(operationSubFunction) {
|
||||||
|
return function(results,source,widget) {
|
||||||
|
if(results.length !== 0) {
|
||||||
|
// Only run if previous run(s) produced results
|
||||||
|
var thisRunResult = operationSubFunction(source,widget);
|
||||||
|
if(thisRunResult.length !== 0) {
|
||||||
|
// Replace results only if this run actually produces a result
|
||||||
|
results.clear();
|
||||||
|
results.pushTop(thisRunResult);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
})();
|
36
core/modules/filters/substitute.js
Normal file
36
core/modules/filters/substitute.js
Normal file
@ -0,0 +1,36 @@
|
|||||||
|
/*\
|
||||||
|
title: $:/core/modules/filters/substitute.js
|
||||||
|
type: application/javascript
|
||||||
|
module-type: filteroperator
|
||||||
|
|
||||||
|
Filter operator for substituting variables and embedded filter expressions with their corresponding values
|
||||||
|
|
||||||
|
\*/
|
||||||
|
(function(){
|
||||||
|
|
||||||
|
/*jslint node: true, browser: true */
|
||||||
|
/*global $tw: false */
|
||||||
|
"use strict";
|
||||||
|
|
||||||
|
/*
|
||||||
|
Export our filter function
|
||||||
|
*/
|
||||||
|
exports.substitute = function(source,operator,options) {
|
||||||
|
var results = [],
|
||||||
|
operands = [];
|
||||||
|
$tw.utils.each(operator.operands,function(operand,index){
|
||||||
|
operands.push({
|
||||||
|
name: (index + 1).toString(),
|
||||||
|
value: operand
|
||||||
|
});
|
||||||
|
});
|
||||||
|
source(function(tiddler,title) {
|
||||||
|
if(title) {
|
||||||
|
results.push(options.wiki.getSubstitutedText(title,options.widget,{substitutions:operands}));
|
||||||
|
}
|
||||||
|
});
|
||||||
|
return results;
|
||||||
|
};
|
||||||
|
|
||||||
|
})();
|
||||||
|
|
@ -305,10 +305,11 @@ exports.parseAttribute = function(source,pos) {
|
|||||||
start: pos
|
start: pos
|
||||||
};
|
};
|
||||||
// Define our regexps
|
// Define our regexps
|
||||||
var reAttributeName = /([^\/\s>"'=]+)/g,
|
var reAttributeName = /([^\/\s>"'`=]+)/g,
|
||||||
reUnquotedAttribute = /([^\/\s<>"'=]+)/g,
|
reUnquotedAttribute = /([^\/\s<>"'`=]+)/g,
|
||||||
reFilteredValue = /\{\{\{([\S\s]+?)\}\}\}/g,
|
reFilteredValue = /\{\{\{([\S\s]+?)\}\}\}/g,
|
||||||
reIndirectValue = /\{\{([^\}]+)\}\}/g;
|
reIndirectValue = /\{\{([^\}]+)\}\}/g,
|
||||||
|
reSubstitutedValue = /(?:```([\s\S]*?)```|`([^`]|[\S\s]*?)`)/g;
|
||||||
// Skip whitespace
|
// Skip whitespace
|
||||||
pos = $tw.utils.skipWhiteSpace(source,pos);
|
pos = $tw.utils.skipWhiteSpace(source,pos);
|
||||||
// Get the attribute name
|
// Get the attribute name
|
||||||
@ -360,6 +361,12 @@ exports.parseAttribute = function(source,pos) {
|
|||||||
pos = macroInvocation.end;
|
pos = macroInvocation.end;
|
||||||
node.type = "macro";
|
node.type = "macro";
|
||||||
node.value = macroInvocation;
|
node.value = macroInvocation;
|
||||||
|
} else {
|
||||||
|
var substitutedValue = $tw.utils.parseTokenRegExp(source,pos,reSubstitutedValue);
|
||||||
|
if(substitutedValue) {
|
||||||
|
pos = substitutedValue.end;
|
||||||
|
node.type = "substituted";
|
||||||
|
node.rawValue = substitutedValue.match[1] || substitutedValue.match[2];
|
||||||
} else {
|
} else {
|
||||||
node.type = "string";
|
node.type = "string";
|
||||||
node.value = "true";
|
node.value = "true";
|
||||||
@ -368,6 +375,7 @@ exports.parseAttribute = function(source,pos) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
node.type = "string";
|
node.type = "string";
|
||||||
node.value = "true";
|
node.value = "true";
|
||||||
|
@ -177,7 +177,7 @@ TranscludeWidget.prototype.getTransclusionTarget = function() {
|
|||||||
var variableInfo = this.getVariableInfo(this.transcludeVariable,{params: this.getOrderedTransclusionParameters()}),
|
var variableInfo = this.getVariableInfo(this.transcludeVariable,{params: this.getOrderedTransclusionParameters()}),
|
||||||
srcVariable = variableInfo && variableInfo.srcVariable;
|
srcVariable = variableInfo && variableInfo.srcVariable;
|
||||||
if(variableInfo.text) {
|
if(variableInfo.text) {
|
||||||
if(srcVariable.isFunctionDefinition) {
|
if(srcVariable && srcVariable.isFunctionDefinition) {
|
||||||
var result = (variableInfo.resultList ? variableInfo.resultList[0] : variableInfo.text) || "";
|
var result = (variableInfo.resultList ? variableInfo.resultList[0] : variableInfo.text) || "";
|
||||||
parser = {
|
parser = {
|
||||||
tree: [{
|
tree: [{
|
||||||
@ -207,7 +207,7 @@ TranscludeWidget.prototype.getTransclusionTarget = function() {
|
|||||||
if(variableInfo.isCacheable && srcVariable[cacheKey]) {
|
if(variableInfo.isCacheable && srcVariable[cacheKey]) {
|
||||||
parser = srcVariable[cacheKey];
|
parser = srcVariable[cacheKey];
|
||||||
} else {
|
} else {
|
||||||
parser = this.wiki.parseText(this.transcludeType,variableInfo.text || "",{parseAsInline: parseAsInline, configTrimWhiteSpace: srcVariable.configTrimWhiteSpace});
|
parser = this.wiki.parseText(this.transcludeType,variableInfo.text || "",{parseAsInline: parseAsInline, configTrimWhiteSpace: srcVariable && srcVariable.configTrimWhiteSpace});
|
||||||
if(variableInfo.isCacheable) {
|
if(variableInfo.isCacheable) {
|
||||||
srcVariable[cacheKey] = parser;
|
srcVariable[cacheKey] = parser;
|
||||||
}
|
}
|
||||||
@ -215,7 +215,7 @@ TranscludeWidget.prototype.getTransclusionTarget = function() {
|
|||||||
}
|
}
|
||||||
if(parser) {
|
if(parser) {
|
||||||
// Add parameters widget for procedures and custom widgets
|
// Add parameters widget for procedures and custom widgets
|
||||||
if(srcVariable.isProcedureDefinition || srcVariable.isWidgetDefinition) {
|
if(srcVariable && (srcVariable.isProcedureDefinition || srcVariable.isWidgetDefinition)) {
|
||||||
parser = {
|
parser = {
|
||||||
tree: [
|
tree: [
|
||||||
{
|
{
|
||||||
@ -234,7 +234,7 @@ TranscludeWidget.prototype.getTransclusionTarget = function() {
|
|||||||
}
|
}
|
||||||
$tw.utils.addAttributeToParseTreeNode(parser.tree[0],name,param["default"])
|
$tw.utils.addAttributeToParseTreeNode(parser.tree[0],name,param["default"])
|
||||||
});
|
});
|
||||||
} else if(srcVariable.isMacroDefinition || !srcVariable.isFunctionDefinition) {
|
} else if(srcVariable && (srcVariable.isMacroDefinition || !srcVariable.isFunctionDefinition)) {
|
||||||
// For macros and ordinary variables, wrap the parse tree in a vars widget assigning the parameters to variables named "__paramname__"
|
// For macros and ordinary variables, wrap the parse tree in a vars widget assigning the parameters to variables named "__paramname__"
|
||||||
parser = {
|
parser = {
|
||||||
tree: [
|
tree: [
|
||||||
|
@ -182,8 +182,7 @@ Widget.prototype.getVariableInfo = function(name,options) {
|
|||||||
}
|
}
|
||||||
return {
|
return {
|
||||||
text: text,
|
text: text,
|
||||||
resultList: [text],
|
resultList: [text]
|
||||||
srcVariable: {}
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -380,6 +379,8 @@ Widget.prototype.computeAttribute = function(attribute) {
|
|||||||
} else if(attribute.type === "macro") {
|
} else if(attribute.type === "macro") {
|
||||||
var variableInfo = this.getVariableInfo(attribute.value.name,{params: attribute.value.params});
|
var variableInfo = this.getVariableInfo(attribute.value.name,{params: attribute.value.params});
|
||||||
value = variableInfo.text;
|
value = variableInfo.text;
|
||||||
|
} else if(attribute.type === "substituted") {
|
||||||
|
value = this.wiki.getSubstitutedText(attribute.rawValue,this) || "";
|
||||||
} else { // String attribute
|
} else { // String attribute
|
||||||
value = attribute.value;
|
value = attribute.value;
|
||||||
}
|
}
|
||||||
|
@ -1063,6 +1063,34 @@ exports.getTextReferenceParserInfo = function(title,field,index,options) {
|
|||||||
return parserInfo;
|
return parserInfo;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
Parse a block of text of a specified MIME type
|
||||||
|
text: text on which to perform substitutions
|
||||||
|
widget
|
||||||
|
options: see below
|
||||||
|
Options include:
|
||||||
|
substitutions: an optional array of substitutions
|
||||||
|
*/
|
||||||
|
exports.getSubstitutedText = function(text,widget,options) {
|
||||||
|
options = options || {};
|
||||||
|
text = text || "";
|
||||||
|
var self = this,
|
||||||
|
substitutions = options.substitutions || [],
|
||||||
|
output;
|
||||||
|
// Evaluate embedded filters and substitute with first result
|
||||||
|
output = text.replace(/\$\{([\S\s]+?)\}\$/g, function(match,filter) {
|
||||||
|
return self.filterTiddlers(filter,widget)[0] || "";
|
||||||
|
});
|
||||||
|
// Process any substitutions provided in options
|
||||||
|
$tw.utils.each(substitutions,function(substitute) {
|
||||||
|
output = $tw.utils.replaceString(output,new RegExp("\\$" + $tw.utils.escapeRegExp(substitute.name) + "\\$","mg"),substitute.value);
|
||||||
|
});
|
||||||
|
// Substitute any variable references with their values
|
||||||
|
return output.replace(/\$\((\w+)\)\$/g, function(match,varname) {
|
||||||
|
return widget.getVariable(varname,{defaultValue: ""})
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Make a widget tree for a parse tree
|
Make a widget tree for a parse tree
|
||||||
parser: parser object
|
parser: parser object
|
||||||
|
@ -3,7 +3,6 @@ tags: $:/tags/MoreSideBar
|
|||||||
caption: {{$:/language/SideBar/Tags/Caption}}
|
caption: {{$:/language/SideBar/Tags/Caption}}
|
||||||
|
|
||||||
\whitespace trim
|
\whitespace trim
|
||||||
|
|
||||||
<$let tv-config-toolbar-icons="yes" tv-config-toolbar-text="yes" tv-config-toolbar-class="">
|
<$let tv-config-toolbar-icons="yes" tv-config-toolbar-text="yes" tv-config-toolbar-class="">
|
||||||
<div class="tc-tiny-v-gap-bottom">
|
<div class="tc-tiny-v-gap-bottom">
|
||||||
{{$:/core/ui/Buttons/tag-manager}}
|
{{$:/core/ui/Buttons/tag-manager}}
|
||||||
|
@ -2,22 +2,29 @@ title: $:/core/ui/TagPickerTagTemplate
|
|||||||
|
|
||||||
\whitespace trim
|
\whitespace trim
|
||||||
<$button class=<<button-classes>> tag="a" tooltip={{$:/language/EditTemplate/Tags/Add/Button/Hint}}>
|
<$button class=<<button-classes>> tag="a" tooltip={{$:/language/EditTemplate/Tags/Add/Button/Hint}}>
|
||||||
<$list filter="[<saveTiddler>minlength[1]]">
|
<$list filter="[<saveTiddler>minlength[1]]">
|
||||||
<$action-listops $tiddler=<<saveTiddler>> $field=<<tagField>> $subfilter="[<tag>]"/>
|
<$action-listops $tiddler=<<saveTiddler>> $field=<<tagField>> $subfilter="[<tag>]"/>
|
||||||
</$list>
|
</$list>
|
||||||
<$set name="currentTiddlerCSSEscaped" value={{{ [<saveTiddler>escapecss[]] }}}>
|
<$set name="currentTiddlerCSSEscaped" value={{{ [<saveTiddler>escapecss[]] }}}>
|
||||||
<$action-sendmessage $message="tm-focus-selector" $param=<<get-tagpicker-focus-selector>> preventScroll="true"/>
|
<$action-sendmessage $message="tm-focus-selector" $param=<<get-tagpicker-focus-selector>> preventScroll="true"/>
|
||||||
</$set>
|
</$set>
|
||||||
<<delete-tag-state-tiddlers>>
|
<<delete-tag-state-tiddlers>>
|
||||||
<$list filter="[<refreshTitle>minlength[1]]">
|
<$list filter="[<refreshTitle>minlength[1]]">
|
||||||
<$action-setfield $tiddler=<<refreshTitle>> text="yes"/>
|
<$action-setfield $tiddler=<<refreshTitle>> text="yes"/>
|
||||||
</$list>
|
</$list>
|
||||||
<<actions>>
|
<<actions>>
|
||||||
<$set name="backgroundColor" value={{{ [<currentTiddler>] :cascade[all[shadows+tiddlers]tag[$:/tags/TiddlerColourFilter]!is[draft]get[text]] }}}>
|
<$set name="backgroundColor"
|
||||||
<$wikify name="foregroundColor" text="""<$macrocall $name="contrastcolour" target=<<backgroundColor>> fallbackTarget=<<fallbackTarget>> colourA=<<colourA>> colourB=<<colourB>>/>""">
|
value={{{ [<currentTiddler>] :cascade[all[shadows+tiddlers]tag[$:/tags/TiddlerColourFilter]!is[draft]get[text]] }}}
|
||||||
<span class="tc-tag-label tc-btn-invisible" style=<<tag-pill-styles>> data-tag-title=<<currentTiddler>> >
|
>
|
||||||
{{||$:/core/ui/TiddlerIcon}}<$view field="title" format="text"/>
|
<$wikify name="foregroundColor"
|
||||||
</span>
|
text="""<$macrocall $name="contrastcolour" target=<<backgroundColor>> fallbackTarget=<<fallbackTarget>> colourA=<<colourA>> colourB=<<colourB>>/>"""
|
||||||
</$wikify>
|
>
|
||||||
</$set>
|
<span class="tc-tag-label tc-btn-invisible"
|
||||||
|
style=<<tag-pill-styles>>
|
||||||
|
data-tag-title=<<currentTiddler>>
|
||||||
|
>
|
||||||
|
{{||$:/core/ui/TiddlerIcon}}<$view field="title" format="text"/>
|
||||||
|
</span>
|
||||||
|
</$wikify>
|
||||||
|
</$set>
|
||||||
</$button>
|
</$button>
|
||||||
|
@ -3,16 +3,23 @@ title: $:/core/ui/TagTemplate
|
|||||||
\whitespace trim
|
\whitespace trim
|
||||||
<span class="tc-tag-list-item" data-tag-title=<<currentTiddler>>>
|
<span class="tc-tag-list-item" data-tag-title=<<currentTiddler>>>
|
||||||
<$set name="transclusion" value=<<currentTiddler>>>
|
<$set name="transclusion" value=<<currentTiddler>>>
|
||||||
<$macrocall $name="tag-pill-body" tag=<<currentTiddler>> icon={{{ [<currentTiddler>] :cascade[all[shadows+tiddlers]tag[$:/tags/TiddlerIconFilter]!is[draft]get[text]] }}} colour={{{ [<currentTiddler>] :cascade[all[shadows+tiddlers]tag[$:/tags/TiddlerColourFilter]!is[draft]get[text]] }}} palette={{$:/palette}} element-tag="""$button""" element-attributes="""popup=<<qualify "$:/state/popup/tag">> dragFilter='[all[current]tagging[]]' tag='span'"""/>
|
<$macrocall $name="tag-pill-body"
|
||||||
<$reveal state=<<qualify "$:/state/popup/tag">> type="popup" position="below" animate="yes" class="tc-drop-down">
|
tag=<<currentTiddler>>
|
||||||
<$set name="tv-show-missing-links" value="yes">
|
icon={{{ [<currentTiddler>] :cascade[all[shadows+tiddlers]tag[$:/tags/TiddlerIconFilter]!is[draft]get[text]] }}}
|
||||||
<$transclude tiddler="$:/core/ui/ListItemTemplate"/>
|
colour={{{ [<currentTiddler>] :cascade[all[shadows+tiddlers]tag[$:/tags/TiddlerColourFilter]!is[draft]get[text]] }}}
|
||||||
</$set>
|
palette={{$:/palette}}
|
||||||
<$list filter="[all[shadows+tiddlers]tag[$:/tags/TagDropdown]!has[draft.of]]" variable="listItem">
|
element-tag="$button"
|
||||||
<$transclude tiddler=<<listItem>>/>
|
element-attributes="""popup=<<qualify "$:/state/popup/tag">> dragFilter="[all[current]tagging[]]" tag='span'"""
|
||||||
</$list>
|
/>
|
||||||
<hr>
|
<$reveal state=<<qualify "$:/state/popup/tag">> type="popup" position="below" animate="yes" class="tc-drop-down">
|
||||||
<$macrocall $name="list-tagged-draggable" tag=<<currentTiddler>>/>
|
<$set name="tv-show-missing-links" value="yes">
|
||||||
</$reveal>
|
<$transclude tiddler="$:/core/ui/ListItemTemplate"/>
|
||||||
|
</$set>
|
||||||
|
<$list filter="[all[shadows+tiddlers]tag[$:/tags/TagDropdown]!has[draft.of]]" variable="listItem">
|
||||||
|
<$transclude tiddler=<<listItem>>/>
|
||||||
|
</$list>
|
||||||
|
<hr>
|
||||||
|
<$macrocall $name="list-tagged-draggable" tag=<<currentTiddler>>/>
|
||||||
|
</$reveal>
|
||||||
</$set>
|
</$set>
|
||||||
</span>
|
</span>
|
||||||
|
@ -9,26 +9,50 @@ color:$(foregroundColor)$;
|
|||||||
|
|
||||||
<!-- This has no whitespace trim to avoid modifying $actions$. Closing tags omitted for brevity. -->
|
<!-- This has no whitespace trim to avoid modifying $actions$. Closing tags omitted for brevity. -->
|
||||||
\define tag-pill-inner(tag,icon,colour,fallbackTarget,colourA,colourB,element-tag,element-attributes,actions)
|
\define tag-pill-inner(tag,icon,colour,fallbackTarget,colourA,colourB,element-tag,element-attributes,actions)
|
||||||
|
\whitespace trim
|
||||||
<$vars
|
<$vars
|
||||||
foregroundColor=<<contrastcolour target:"""$colour$""" fallbackTarget:"""$fallbackTarget$""" colourA:"""$colourA$""" colourB:"""$colourB$""">>
|
foregroundColor=<<contrastcolour target:"""$colour$""" fallbackTarget:"""$fallbackTarget$""" colourA:"""$colourA$""" colourB:"""$colourB$""">>
|
||||||
backgroundColor="""$colour$"""
|
backgroundColor=<<__colour__>>
|
||||||
><$element-tag$
|
>
|
||||||
|
<$element-tag$
|
||||||
$element-attributes$
|
$element-attributes$
|
||||||
class="tc-tag-label tc-btn-invisible"
|
class="tc-tag-label tc-btn-invisible"
|
||||||
style=<<tag-pill-styles>>
|
style=<<tag-pill-styles>>
|
||||||
>$actions$<$transclude tiddler="""$icon$"""/><$view tiddler=<<__tag__>> field="title" format="text" /></$element-tag$>
|
>
|
||||||
|
<<__actions__>>
|
||||||
|
<$transclude tiddler=<<__icon__>>/>
|
||||||
|
<$view tiddler=<<__tag__>> field="title" format="text" />
|
||||||
|
</$element-tag$>
|
||||||
\end
|
\end
|
||||||
|
|
||||||
\define tag-pill-body(tag,icon,colour,palette,element-tag,element-attributes,actions)
|
\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$"""/>
|
\whitespace trim
|
||||||
|
<$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__>>
|
||||||
|
/>
|
||||||
\end
|
\end
|
||||||
|
|
||||||
\define tag-pill(tag,element-tag:"span",element-attributes:"",actions:"")
|
\define tag-pill(tag,element-tag:"span",element-attributes:"",actions:"")
|
||||||
\whitespace trim
|
\whitespace trim
|
||||||
<span class="tc-tag-list-item" data-tag-title=<<__tag__>>>
|
<span class="tc-tag-list-item" data-tag-title=<<__tag__>>>
|
||||||
<$let currentTiddler=<<__tag__>>>
|
<$let currentTiddler=<<__tag__>>>
|
||||||
<$macrocall $name="tag-pill-body" tag=<<__tag__>> icon={{{ [<currentTiddler>] :cascade[all[shadows+tiddlers]tag[$:/tags/TiddlerIconFilter]!is[draft]get[text]] }}} colour={{{ [<currentTiddler>] :cascade[all[shadows+tiddlers]tag[$:/tags/TiddlerColourFilter]!is[draft]get[text]] }}} palette={{$:/palette}} element-tag="""$element-tag$""" element-attributes="""$element-attributes$""" actions="""$actions$"""/>
|
<$macrocall $name="tag-pill-body"
|
||||||
</$let>
|
tag=<<__tag__>>
|
||||||
|
icon={{{ [<currentTiddler>] :cascade[all[shadows+tiddlers]tag[$:/tags/TiddlerIconFilter]!is[draft]get[text]] }}}
|
||||||
|
colour={{{ [<currentTiddler>] :cascade[all[shadows+tiddlers]tag[$:/tags/TiddlerColourFilter]!is[draft]get[text]] }}}
|
||||||
|
palette={{$:/palette}}
|
||||||
|
element-tag=<<__element-tag__>>
|
||||||
|
element-attributes=<<__element-attributes__>>
|
||||||
|
actions=<<__actions__>>/>
|
||||||
|
</$let>
|
||||||
</span>
|
</span>
|
||||||
\end
|
\end
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
caption: 5.3.0
|
caption: 5.3.0
|
||||||
created: 20230506164543446
|
created: 20230624100932287
|
||||||
modified: 20230506164543446
|
modified: 20230624100932287
|
||||||
tags: ReleaseNotes
|
tags: ReleaseNotes
|
||||||
title: Release 5.3.0
|
title: Release 5.3.0
|
||||||
type: text/vnd.tiddlywiki
|
type: text/vnd.tiddlywiki
|
||||||
@ -28,31 +28,52 @@ The approach taken by this release is to add new functionality by extending and
|
|||||||
|
|
||||||
These changes lay the groundwork for macros and related features to be deprecated (which is the point at which users are advised not to use old features, and instead given clear pointers to the equivalent modern functionality).
|
These changes lay the groundwork for macros and related features to be deprecated (which is the point at which users are advised not to use old features, and instead given clear pointers to the equivalent modern functionality).
|
||||||
|
|
||||||
The new transclusion architecture is not by itself sufficient to enable us to fully deprecate macros yet. To handle the remaining use cases we propose a new backtick quoted attribute format that allows for the substitution of variable values. See https://github.com/Jermolene/TiddlyWiki5/issues/6663 for details.
|
! Text Substitution Improvements
|
||||||
|
|
||||||
|
<<.link-badge-added "https://github.com/Jermolene/TiddlyWiki5/pull/7526">> The new transclusion architecture is not by itself sufficient to enable us to fully deprecate macros yet. To handle most of the remaining use cases this release adds convenient new ways of using textual substitution without having to create a macro:
|
||||||
|
|
||||||
|
Firstly, the new [[text substitution syntax for widget attributes|Substituted Attribute Values]] allows widget attributes to be assigned the value of a string with certain placeholders being replaced by their processed contents. For example:
|
||||||
|
|
||||||
|
* Substitute variable names with the value with <$codeblock code="attr=`Current tiddler is $(currentTiddler)$`"/>
|
||||||
|
* Substitute filter expressions with the first value they return with <$codeblock code="attr=```There are ${ [tag[Done]count[]] }$ completed tasks```"/>
|
||||||
|
|
||||||
|
Secondly, the new [[substitute operator|substitute Operator]] allows the same textual substitutions to be performed via a filter operator with the addition of positional parameters that use placeholders of the form `$1$`, `$2$`, `$3$` etc.
|
||||||
|
|
||||||
|
```
|
||||||
|
[[https://$1$/$(currentTiddler)$]substitute<domain-name>]
|
||||||
|
```
|
||||||
|
|
||||||
|
! HTTP Requests in WikiText
|
||||||
|
|
||||||
|
<<.link-badge-added "https://github.com/Jermolene/TiddlyWiki5/pull/7422">> new [[WidgetMessage: tm-http-request]] for performing HTTP requests in WikiText. This opens up some exciting new opportunities:
|
||||||
|
|
||||||
|
* Integration with Web-based APIs. The documentation includes an [[example of using the Zotero API|WidgetMessage: tm-http-request Example - Zotero]] to retrieve academic citation data
|
||||||
|
* Dynamic content loading: additional tiddlers can be imported dynamically after the main wiki has loaded
|
||||||
|
|
||||||
! Defaulting to Disabling CamelCase Links
|
! Defaulting to Disabling CamelCase Links
|
||||||
|
|
||||||
<<.link-badge-updated "https://github.com/Jermolene/TiddlyWiki5/pull/7513">> CamelCase linking is now disabled by default. (Note that this wiki has CamelCase linking explicitly enabled)
|
<<.link-badge-updated "https://github.com/Jermolene/TiddlyWiki5/pull/7513">> CamelCase linking is now disabled by default for new wikis. (Note that this wiki has CamelCase linking explicitly enabled)
|
||||||
|
|
||||||
! Plugin Improvements
|
! Plugin Improvements
|
||||||
|
|
||||||
|
* <<.link-badge-updated "https://github.com/Jermolene/TiddlyWiki5/pull/7554">> Google Analytics plugin to use new GA4 code. Note that the update requires manual configuration to use the new "measurement ID" instead of the old "account ID"
|
||||||
* <<.link-badge-extended "https://github.com/Jermolene/TiddlyWiki5/pull/7260">> Dynannotate pugin to support three additional search modes
|
* <<.link-badge-extended "https://github.com/Jermolene/TiddlyWiki5/pull/7260">> Dynannotate pugin to support three additional search modes
|
||||||
* <<.link-badge-fixed "https://github.com/Jermolene/TiddlyWiki5/pull/7365">> problem with [[BrowserStorage Plugin]] unnecessarily saving shadow tiddlers
|
* <<.link-badge-fixed "https://github.com/Jermolene/TiddlyWiki5/pull/7365">> problem with [[BrowserStorage Plugin]] unnecessarily saving shadow tiddlers
|
||||||
|
|
||||||
|
* <<.link-badge-improved "https://github.com/Jermolene/TiddlyWiki5/pull/7398">> [[BrowserStorage Plugin]] to request that browser storage be persisted without eviction
|
||||||
* <<.link-badge-improved "https://github.com/Jermolene/TiddlyWiki5/pull/7493">> [[CodeMirror Plugin]] to add an option to make trailing spaces visible
|
* <<.link-badge-improved "https://github.com/Jermolene/TiddlyWiki5/pull/7493">> [[CodeMirror Plugin]] to add an option to make trailing spaces visible
|
||||||
|
|
||||||
! Translation improvement
|
! Translation improvement
|
||||||
|
|
||||||
Improvements to the following translations:
|
Improvements to the following translations:
|
||||||
|
|
||||||
*
|
* German
|
||||||
|
* Polish
|
||||||
! Accessibility Improvements
|
* Chinese
|
||||||
|
|
||||||
*
|
|
||||||
|
|
||||||
! Usability Improvements
|
! Usability Improvements
|
||||||
|
|
||||||
*
|
* <<.link-badge-improved "https://github.com/Jermolene/TiddlyWiki5/pull/7524">> consistency of layout of "Settings" tab in $:/ControlPanel
|
||||||
|
|
||||||
! Widget Improvements
|
! Widget Improvements
|
||||||
|
|
||||||
@ -62,15 +83,18 @@ Improvements to the following translations:
|
|||||||
|
|
||||||
* <<.link-badge-added "https://github.com/Jermolene/TiddlyWiki5/pull/7511"> new [[deserialize Operator]] for converting various textual representations of tiddlers into JSON data
|
* <<.link-badge-added "https://github.com/Jermolene/TiddlyWiki5/pull/7511"> new [[deserialize Operator]] for converting various textual representations of tiddlers into JSON data
|
||||||
* <<.link-badge-extended "https://github.com/Jermolene/TiddlyWiki5/pull/7292">> [[format Operator]] to support converting Unix timestamps to TiddlyWiki's native date format
|
* <<.link-badge-extended "https://github.com/Jermolene/TiddlyWiki5/pull/7292">> [[format Operator]] to support converting Unix timestamps to TiddlyWiki's native date format
|
||||||
|
* <<.link-badge-added "https://github.com/Jermolene/TiddlyWiki5/pull/7392">> new [[':then' filter run prefix|Then Filter Run Prefix]]
|
||||||
|
|
||||||
! Hackability Improvements
|
! Hackability Improvements
|
||||||
|
|
||||||
* <<.link-badge-extended "https://github.com/Jermolene/TiddlyWiki5/pull/7413">> [[Core Icons]] to allow the size to be controlled with a parameter
|
* <<.link-badge-extended "https://github.com/Jermolene/TiddlyWiki5/pull/7413">> [[Core Icons]] to allow the size to be controlled with a parameter
|
||||||
** <<.warning """This change can cause problems with non-standard usage of the core icons where the text is directly rendered instead of being transcluded""">>
|
** <<.warning """This change can cause problems with non-standard usage of the core icons where the text is directly rendered instead of being transcluded""">>
|
||||||
* <<.link-badge-added "https://github.com/Jermolene/TiddlyWiki5/pull/7182">> new [[thisTiddler Variable]] that refers to the tiddler currently being rendered
|
* <<.link-badge-added "https://github.com/Jermolene/TiddlyWiki5/pull/7182">> new [[thisTiddler Variable]] that refers to the tiddler currently being rendered
|
||||||
|
* <<.link-badge-added "https://github.com/Jermolene/TiddlyWiki5/pull/7530">> `data-tag-title` attribute to all tag pills, allowing easier [[Custom tag pill styles]]
|
||||||
* <<.link-badge-improved "https://github.com/Jermolene/TiddlyWiki5/pull/7332">> [[Story Tiddler Template Cascade]] handling to fall back to the default template if the output of the cascade is not valid
|
* <<.link-badge-improved "https://github.com/Jermolene/TiddlyWiki5/pull/7332">> [[Story Tiddler Template Cascade]] handling to fall back to the default template if the output of the cascade is not valid
|
||||||
* <<.link-badge-fixed "https://github.com/Jermolene/TiddlyWiki5/pull/7378">> missing file extensions for "audio/mpeg" files
|
* <<.link-badge-fixed "https://github.com/Jermolene/TiddlyWiki5/pull/7378">> missing file extensions for "audio/mpeg" files
|
||||||
|
* <<.link-badge-extended "https://github.com/Jermolene/TiddlyWiki5/pull/7417">> [[Table-of-Contents Macros]] to add consistent support for an ''exclude'' parameter
|
||||||
|
* <<.link-badge-added "https://github.com/Jermolene/TiddlyWiki5/commit/190613ad2989f70526f86eef17f524087f60eb72">> [[tv-config-static Variable]] for indicating static rendering
|
||||||
|
|
||||||
! Bug Fixes
|
! Bug Fixes
|
||||||
|
|
||||||
@ -84,10 +108,6 @@ Improvements to the following translations:
|
|||||||
* <<.link-badge-fixed "https://github.com/Jermolene/TiddlyWiki5/commit/8e132948b6bec623d81d300fbe6dc3a0307bcc6d">> crash when transcluding a lazily loaded tiddler as an attribute value
|
* <<.link-badge-fixed "https://github.com/Jermolene/TiddlyWiki5/commit/8e132948b6bec623d81d300fbe6dc3a0307bcc6d">> crash when transcluding a lazily loaded tiddler as an attribute value
|
||||||
* <<.link-badge-fixed "https://github.com/Jermolene/TiddlyWiki5/issues/7462">> DiffTextWidget crash with missing or empty attributes
|
* <<.link-badge-fixed "https://github.com/Jermolene/TiddlyWiki5/issues/7462">> DiffTextWidget crash with missing or empty attributes
|
||||||
|
|
||||||
! Developer Improvements
|
|
||||||
|
|
||||||
*
|
|
||||||
|
|
||||||
! Node.js Improvements
|
! Node.js Improvements
|
||||||
|
|
||||||
* <<.link-badge-extended "https://github.com/Jermolene/TiddlyWiki5/pull/7471">> [[WebServer Parameter: authenticated-user-header]] to require URI encoding of authenticated username header, permitting non-ASCII characters in usernames
|
* <<.link-badge-extended "https://github.com/Jermolene/TiddlyWiki5/pull/7471">> [[WebServer Parameter: authenticated-user-header]] to require URI encoding of authenticated username header, permitting non-ASCII characters in usernames
|
||||||
@ -103,10 +123,15 @@ Improvements to the following translations:
|
|||||||
[[@Jermolene|https://github.com/Jermolene]] would like to thank the contributors to this release who have generously given their time to help improve TiddlyWiki:
|
[[@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 """
|
<<.contributors """
|
||||||
|
AnthonyMuscio
|
||||||
Arlen22
|
Arlen22
|
||||||
BramChen
|
BramChen
|
||||||
btheado
|
btheado
|
||||||
|
buggyj
|
||||||
|
carlo-carlombo
|
||||||
|
cdruan
|
||||||
donmor
|
donmor
|
||||||
|
EvidentlyCube
|
||||||
flibbles
|
flibbles
|
||||||
GameDungeon
|
GameDungeon
|
||||||
JoshuaFontany
|
JoshuaFontany
|
||||||
@ -122,4 +147,5 @@ saqimtiaz
|
|||||||
tavin
|
tavin
|
||||||
twMat
|
twMat
|
||||||
yaisog
|
yaisog
|
||||||
|
Zacharia2
|
||||||
""">>
|
""">>
|
||||||
|
40
editions/test/tiddlers/tests/data/filters/substitute.tid
Normal file
40
editions/test/tiddlers/tests/data/filters/substitute.tid
Normal file
@ -0,0 +1,40 @@
|
|||||||
|
title: Filters/substitute
|
||||||
|
description: Test substitute operator
|
||||||
|
type: text/vnd.tiddlywiki-multiple
|
||||||
|
tags: [[$:/tags/wiki-test-spec]]
|
||||||
|
|
||||||
|
title: substitute filter data 1
|
||||||
|
tags: Hello There [[Welcome to TiddlyWiki]] GettingStarted
|
||||||
|
|
||||||
|
TiddlyWiki
|
||||||
|
+
|
||||||
|
title: substitute filter data 2
|
||||||
|
|
||||||
|
The output of the filter `[[substitute filter data 1]tags[]]` is ${[[substitute filter data 1]tags[]]}$.
|
||||||
|
+
|
||||||
|
title: substitute filter data 3
|
||||||
|
|
||||||
|
Welcome to $(projectname)$ $1$ $2$ $3$. Tiddlers starting with `substitute`: ${[prefix[substitute]format:titlelist[]join[ ]]}$.
|
||||||
|
+
|
||||||
|
title: Output
|
||||||
|
|
||||||
|
\whitespace trim
|
||||||
|
<$let projectname="TiddlyWiki">
|
||||||
|
(<$text text={{{ [[]substitute[]] }}}/>)
|
||||||
|
(<$text text={{{ [[Hello There, welcome to $TiddlyWiki$]substitute[]] }}}/>)
|
||||||
|
(<$text text={{{ [[Welcome to $(projectname)$]substitute[]] }}}/>)
|
||||||
|
(<$text text={{{ [[Welcome to $(projectname)$ $1$]substitute[today]] }}}/>)
|
||||||
|
(<$text text={{{ [[This is not a valid embedded filter ${ hello )$]substitute[]] }}}/>)
|
||||||
|
(<$text text={{{ [{substitute filter data 2}substitute[]] }}}/>)
|
||||||
|
(<$text text={{{ [{substitute filter data 3}substitute[every],[day]] }}}/>)
|
||||||
|
</$let>
|
||||||
|
+
|
||||||
|
title: ExpectedResult
|
||||||
|
|
||||||
|
<p>()
|
||||||
|
(Hello There, welcome to $TiddlyWiki$)
|
||||||
|
(Welcome to TiddlyWiki)
|
||||||
|
(Welcome to TiddlyWiki today)
|
||||||
|
(This is not a valid embedded filter ${ hello )$)
|
||||||
|
(The output of the filter `[[substitute filter data 1]tags[]]` is Hello.)
|
||||||
|
(Welcome to TiddlyWiki every day $3$. Tiddlers starting with `substitute`: [[substitute filter data 1]] [[substitute filter data 2]] [[substitute filter data 3]].)</p>
|
@ -0,0 +1,19 @@
|
|||||||
|
title: Widgets/SubstitutedAttributes
|
||||||
|
description: Attributes specified as string that should have substitution performed.
|
||||||
|
type: text/vnd.tiddlywiki-multiple
|
||||||
|
tags: [[$:/tags/wiki-test-spec]]
|
||||||
|
|
||||||
|
title: Output
|
||||||
|
|
||||||
|
\whitespace trim
|
||||||
|
<$let project="TiddlyWiki" disabled="true">
|
||||||
|
<div class=`$(project)$
|
||||||
|
${ [[Hello]addsuffix[There]] }$` attrib=`myvalue` otherattrib=`$(1)$` blankattrib=`` quoted="here" disabled=```$(disabled)$```>
|
||||||
|
</div>
|
||||||
|
</$let>
|
||||||
|
|
||||||
|
+
|
||||||
|
title: ExpectedResult
|
||||||
|
|
||||||
|
<p><div attrib="myvalue" blankattrib="" class="TiddlyWiki
|
||||||
|
HelloThere" disabled="true" otherattrib="" quoted="here"></div></p>
|
@ -161,6 +161,16 @@ describe("HTML tag new parser tests", function() {
|
|||||||
expect($tw.utils.parseAttribute(" attrib1>",0)).toEqual(
|
expect($tw.utils.parseAttribute(" attrib1>",0)).toEqual(
|
||||||
{ type : 'string', value : 'true', start : 0, name : 'attrib1', end : 8 }
|
{ type : 'string', value : 'true', start : 0, name : 'attrib1', end : 8 }
|
||||||
);
|
);
|
||||||
|
expect($tw.utils.parseAttribute("p=`blah` ",1)).toEqual(null);
|
||||||
|
expect($tw.utils.parseAttribute("p=`blah` ",0)).toEqual(
|
||||||
|
{ start: 0, name: 'p', type: 'substituted', rawValue: 'blah', end: 8 }
|
||||||
|
);
|
||||||
|
expect($tw.utils.parseAttribute("p=```blah``` ",0)).toEqual(
|
||||||
|
{ start: 0, name: 'p', type: 'substituted', rawValue: 'blah', end: 12 }
|
||||||
|
);
|
||||||
|
expect($tw.utils.parseAttribute("p=`Hello \"There\"`",0)).toEqual(
|
||||||
|
{ start: 0, name: 'p', type: 'substituted', rawValue: 'Hello "There"', end: 17 }
|
||||||
|
);
|
||||||
});
|
});
|
||||||
|
|
||||||
it("should parse HTML tags", function() {
|
it("should parse HTML tags", function() {
|
||||||
|
@ -434,6 +434,15 @@ describe("'reduce' and 'intersection' filter prefix tests", function() {
|
|||||||
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");
|
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");
|
||||||
});
|
});
|
||||||
|
|
||||||
|
it("should handle the :then prefix", function() {
|
||||||
|
expect(wiki.filterTiddlers("[[one]] :then[[two]]").join(",")).toBe("two");
|
||||||
|
expect(wiki.filterTiddlers("[[one]] :then[tag[shopping]]").join(",")).toBe("Brownies,Chick Peas,Milk,Rice Pudding");
|
||||||
|
expect(wiki.filterTiddlers("[[one]] [[two]] [[three]] :then[[four]]").join(",")).toBe("four");
|
||||||
|
expect(wiki.filterTiddlers("[[one]] :then[tag[nonexistent]]").join(",")).toBe("one");
|
||||||
|
expect(wiki.filterTiddlers(":then[[two]]").length).toBe(0);
|
||||||
|
expect(wiki.filterTiddlers("[[notatiddler]is[tiddler]] :then[[two]]").length).toBe(0);
|
||||||
|
});
|
||||||
|
|
||||||
it("should handle macro parameters for filter run prefixes",function() {
|
it("should handle macro parameters for filter run prefixes",function() {
|
||||||
var widget = require("$:/core/modules/widgets/widget.js");
|
var widget = require("$:/core/modules/widgets/widget.js");
|
||||||
var rootWidget = new widget.widget({ type:"widget", children:[ {type:"widget", children:[]} ] },
|
var rootWidget = new widget.widget({ type:"widget", children:[ {type:"widget", children:[]} ] },
|
||||||
|
20
editions/tw5.com/tiddlers/features/Deserializers.tid
Normal file
20
editions/tw5.com/tiddlers/features/Deserializers.tid
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
created: 20230627093650105
|
||||||
|
modified: 20230627094356394
|
||||||
|
tags: Features
|
||||||
|
title: Deserializers
|
||||||
|
type: text/vnd.tiddlywiki
|
||||||
|
|
||||||
|
Deserializer [[modules|Modules]] parse text in various formats into their JSON representation as tiddlers. The deserializer modules available in a wiki can be seen using the [[deserializers operator|deserializers Operator]] and can be used with the [[deserialize Operator]].
|
||||||
|
|
||||||
|
The TiddlyWiki core provides the following deserializers:
|
||||||
|
|
||||||
|
|!Deserializer |!Description |
|
||||||
|
|(DOM)|Extracts tiddlers from a DOM node, should not be used with the <<.op deserialize[]>> operator |
|
||||||
|
|application/javascript|Parses a JavaScript module as a tiddler extracting fields from the header comment|
|
||||||
|
|application/json|Parses [[JSON|JSON in TiddlyWiki]] into tiddlers|
|
||||||
|
|application/x-tiddler|Parses the [[.tid file format|TiddlerFiles]] as a tiddler|
|
||||||
|
|application/x-tiddler-html-div|Parses the [[<DIV>.tiddler file format|TiddlerFiles]] as a tiddler|
|
||||||
|
|application/x-tiddlers|Parses the [[MultiTiddlerFile format|MultiTiddlerFiles]] as tiddlers|
|
||||||
|
|text/css|Parses CSS as a tiddler extracting fields from the header comment|
|
||||||
|
|text/html|Parses an HTML file into tiddlers. Supports ~TiddlyWiki Classic HTML files, ~TiddlyWiki5 HTML files and ordinary HTML files|
|
||||||
|
|text/plain|Parses plain text as a tiddler|
|
@ -1,12 +1,12 @@
|
|||||||
created: 20190802113703788
|
created: 20190802113703788
|
||||||
modified: 20190802132727925
|
modified: 20230501175143648
|
||||||
tags: Filters
|
tags: Filters
|
||||||
title: Conditional Operators
|
title: Conditional Operators
|
||||||
type: text/vnd.tiddlywiki
|
type: text/vnd.tiddlywiki
|
||||||
|
|
||||||
<<.from-version "5.1.20">>The conditional filter operators allow ''if-then-else'' logic to be expressed within filters.
|
<<.from-version "5.1.20">>The conditional filter operators allow for ''if-then-else'' logic to be expressed within filters.
|
||||||
|
|
||||||
The foundation is the convention that an empty list can be used to represent the boolean value ''false'' and a list with at one (or more) entries to represent ''true''.
|
The foundation is the convention that an empty list can be used to represent the Boolean value <<.value false>> and a list with at one (or more) entries to represent <<.value true>>.
|
||||||
|
|
||||||
The conditional operators are:
|
The conditional operators are:
|
||||||
|
|
||||||
@ -19,10 +19,12 @@ The conditional operators are:
|
|||||||
|
|
||||||
These operators can be combined. For example:
|
These operators can be combined. For example:
|
||||||
|
|
||||||
<<.inline-operator-example "[[New Tiddler]is[missing]then[I am missing]else[No I am not missing]]">>
|
<<.operator-example 1 "[[New Tiddler]is[missing]then[I am missing]else[No I am not missing]]">>
|
||||||
|
|
||||||
The [[else Operator]] can be used to apply a defaults for missing values. In this example, we take advantage of the fact that the [[get Operator]] returns an empty list if the field or tiddler does not exist:
|
The <<.olink else>> operator can be used to apply a defaults for missing values. In this example, we take advantage of the fact that the <<.olink get>> operator returns an empty list if the field or tiddler does not exist:
|
||||||
|
|
||||||
<<.inline-operator-example "[[HelloThere]get[custom-field]else[default-value]]">>
|
<<.operator-example 2 "[[HelloThere]get[custom-field]else[default-value]]">>
|
||||||
|
|
||||||
<<list-links "[tag[Conditional Operators]]">>
|
! Filter Run Prefixes
|
||||||
|
|
||||||
|
The [[:then|:then Filter Run Prefix]] and [[:else|:else Filter Run Prefix]] filter run prefixes serve a similar purpose as the conditional operators. Refer to their documentation for more information.
|
@ -1,7 +1,7 @@
|
|||||||
caption: deserialize
|
caption: deserialize
|
||||||
created: 20230601195749377
|
created: 20230601195749377
|
||||||
from-version: 5.3.0
|
from-version: 5.3.0
|
||||||
modified: 20230602105513132
|
modified: 20230627094109762
|
||||||
op-input: a selection of strings
|
op-input: a selection of strings
|
||||||
op-output: JSON representations of tiddlers extracted from input titles.
|
op-output: JSON representations of tiddlers extracted from input titles.
|
||||||
op-parameter: the deserializer module to be used to extract tiddlers from the input
|
op-parameter: the deserializer module to be used to extract tiddlers from the input
|
||||||
@ -10,17 +10,8 @@ tags: [[Filter Operators]] [[Special Operators]]
|
|||||||
title: deserialize Operator
|
title: deserialize Operator
|
||||||
type: text/vnd.tiddlywiki
|
type: text/vnd.tiddlywiki
|
||||||
|
|
||||||
<<.tip "Deserializer modules parse text in various formats into their JSON representation as tiddlers. You can see the deserializers available in a wiki using the [[deserializers operator|deserializers Operator]].">>
|
{{Deserializers}}
|
||||||
|
|
||||||
|
|
||||||
|!Deserializer |!Description |
|
|
||||||
|(DOM)|Extracts tiddlers from a DOM node, should not be used with the <<.op deserialize[]>> operator |
|
|
||||||
|application/javascript|Parses a JavaScript module as a tiddler extracting fields from the header comment|
|
|
||||||
|application/json|Parses [[JSON|JSON in TiddlyWiki]] into tiddlers|
|
|
||||||
|application/x-tiddler|Parses the [[.tid file format|TiddlerFiles]] as a tiddler|
|
|
||||||
|application/x-tiddler-html-div|Parses the [[<DIV>.tiddler file format|TiddlerFiles]] as a tiddler|
|
|
||||||
|application/x-tiddlers|Parses the [[MultiTiddlerFile format|MultiTiddlerFiles]] as tiddlers|
|
|
||||||
|text/css|Parses CSS as a tiddler extracting fields from the header comment|
|
|
||||||
|text/html|Parses an HTML file into tiddlers. Supports ~TiddlyWiki Classic HTML files, ~TiddlyWiki5 HTML files and ordinary HTML files|
|
|
||||||
|text/plain|Parses plain text as a tiddler|
|
|
||||||
|
|
||||||
<<.operator-examples "deserialize">>
|
<<.operator-examples "deserialize">>
|
@ -1,7 +1,7 @@
|
|||||||
caption: deserializers
|
caption: deserializers
|
||||||
created: 20210506115203172
|
created: 20210506115203172
|
||||||
from-version: 5.2.0
|
from-version: 5.2.0
|
||||||
modified: 20210506130322593
|
modified: 20230627094238610
|
||||||
op-input: ignored
|
op-input: ignored
|
||||||
op-output: the title of each available deserializer
|
op-output: the title of each available deserializer
|
||||||
op-parameter: none
|
op-parameter: none
|
||||||
@ -9,6 +9,6 @@ tags: [[Filter Operators]] [[Special Operators]] [[Selection Constructors]]
|
|||||||
title: deserializers Operator
|
title: deserializers Operator
|
||||||
type: text/vnd.tiddlywiki
|
type: text/vnd.tiddlywiki
|
||||||
|
|
||||||
<<.tip "You can specify a specific deserializer for a DropzoneWidget to use">>
|
<<.tip "You can specify a specific [[deserializer|Deserializers]] for a DropzoneWidget to use">>
|
||||||
|
|
||||||
<<.operator-examples "deserializers">>
|
<<.operator-examples "deserializers">>
|
||||||
|
@ -0,0 +1,37 @@
|
|||||||
|
created: 20230614225302905
|
||||||
|
modified: 20230614233448662
|
||||||
|
tags: [[Operator Examples]] [[substitute Operator]]
|
||||||
|
title: substitute Operator (Examples)
|
||||||
|
type: text/vnd.tiddlywiki
|
||||||
|
|
||||||
|
\define time() morning
|
||||||
|
\define field() modified
|
||||||
|
\procedure sentence() This tiddler was last $(field)$ on ${[{!!modified}format:date[DDth MMM YYYY]]}$
|
||||||
|
\define name() Bugs Bunny
|
||||||
|
\define address() Rabbit Hole Hill
|
||||||
|
|
||||||
|
!Substitute <<.op substitute[]>> operator parameters
|
||||||
|
<<.operator-example 1 "[[Hi, I'm $1$ and I live in $2$]substitute[Bugs Bunny],[Rabbit Hole Hill]]">>
|
||||||
|
|
||||||
|
!Substitute variables
|
||||||
|
This example uses the following variables:
|
||||||
|
|
||||||
|
* name: <$codeblock code=<<name>>/>
|
||||||
|
* address: <$codeblock code=<<address>>/>
|
||||||
|
|
||||||
|
<<.operator-example 2 "[[Hi, I'm $(name)$ and I live in $(address)$]substitute[]]">>
|
||||||
|
|
||||||
|
!Substitute variables and operator parameters
|
||||||
|
This example uses the following variable:
|
||||||
|
|
||||||
|
* time: <$codeblock code=<<time>>/>
|
||||||
|
|
||||||
|
<<.operator-example 3 "[[Something in the $(time)$ at $2$ about $1$ ]substitute[Maths],[the Library]]">>
|
||||||
|
|
||||||
|
!Substitute a filter expression and a variable
|
||||||
|
This example uses the following variables:
|
||||||
|
|
||||||
|
* field: <$codeblock code=<<field>>/>
|
||||||
|
* sentence: <$codeblock code=<<sentence>>/>
|
||||||
|
|
||||||
|
<<.operator-example 4 "[<sentence>substitute[]]">>
|
27
editions/tw5.com/tiddlers/filters/substitute Operator.tid
Normal file
27
editions/tw5.com/tiddlers/filters/substitute Operator.tid
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
caption: substitute
|
||||||
|
created: 20230614223551834
|
||||||
|
modified: 20230615173049692
|
||||||
|
op-input: a [[selection of titles|Title Selection]]
|
||||||
|
op-output: the input titles with placeholders for filter expressions, parameter and variables replaced with their corresponding values
|
||||||
|
op-parameter: the <<.op substitute>> operator optionally accepts a variable number of parameters, see below for details
|
||||||
|
op-purpose: returns each item in the list, replacing within each title placeholders for filters, parameters and variables with their corresponding values
|
||||||
|
tags: [[Filter Operators]] [[String Operators]]
|
||||||
|
title: substitute Operator
|
||||||
|
type: text/vnd.tiddlywiki
|
||||||
|
|
||||||
|
<<.from-version "5.3.0">>
|
||||||
|
|
||||||
|
The <<.op substitute>> operator replaces any placeholders in the input titles in the following order:
|
||||||
|
|
||||||
|
# filter expressions
|
||||||
|
# parameters to the <<.op substitute>> operator
|
||||||
|
# variables
|
||||||
|
|
||||||
|
|placeholder syntax|description|h
|
||||||
|
|`$n$`|Text substitution of a parameter provided to the operator, where n is the position of the parameter starting with 1 for the first parameter. Unmatched placeholders pass through unchanged.|
|
||||||
|
|`$(varname)$`|Text substitution of a variable. Undefined variables are replaced with an empty string.|
|
||||||
|
|`${ filter expression }$`|Text substitution with the first result of evaluating the filter expression. |
|
||||||
|
|
||||||
|
<<.tip """Placeholders that contain square bracket characters are not valid filter syntax when used directly in a filter expression. However they can be provided as input to the <$macrocall $name=".op" _="substitute"/> operator as text references or variables""">>
|
||||||
|
|
||||||
|
<<.operator-examples "substitute">>
|
@ -0,0 +1,49 @@
|
|||||||
|
created: 20230617183745774
|
||||||
|
modified: 20230617183745774
|
||||||
|
tags: [[Then Filter Run Prefix]]
|
||||||
|
title: Then Filter Run Prefix (Examples)
|
||||||
|
type: text/vnd.tiddlywiki
|
||||||
|
|
||||||
|
|
||||||
|
!! Conditional Execution
|
||||||
|
|
||||||
|
The <<.op :then>> filter run prefix can be used to avoid the need for nested [[ListWidget]]s or [[Macro Definitions in WikiText]].
|
||||||
|
|
||||||
|
<$macrocall $name='wikitext-example-without-html'
|
||||||
|
src="""<$edit-text field="search" placeholder="Search title"/>
|
||||||
|
|
||||||
|
<$let searchTerm={{!!search}}>
|
||||||
|
<$list filter="[<searchTerm>minlength[3]] :then[!is[system]search:title<searchTerm>]" template="$:/core/ui/ListItemTemplate"/>
|
||||||
|
</$let>"""/>
|
||||||
|
|
||||||
|
|
||||||
|
!! Conditional (Sub)Filters
|
||||||
|
|
||||||
|
The <<.op :then>> filter run prefix can be combined with the <<.op :else>> prefix to create conditional filters. In this example, the fields used in <<.var searchSubfilter>> for searching depend on the value of [[$:/temp/searchFields]] and the sort order used by <<.var sortSubfilter>> depends on the value of [[$:/temp/searchSort]]. Checkboxes are used to set the values of these tiddlers.
|
||||||
|
|
||||||
|
<<.tip "Note that each filter run of the subfilter receives the input of the <<.olink subfilter>> operator as input">>
|
||||||
|
|
||||||
|
Since the <<.olink then>> and <<.olink else>> operators cannot call subfilters or perform additional filter steps, they cannot be used for such applications.
|
||||||
|
|
||||||
|
<$macrocall $name='wikitext-example-without-html'
|
||||||
|
src="""<$checkbox tiddler="$:/temp/searchSort"
|
||||||
|
field="text"
|
||||||
|
checked="chrono" unchecked="alpha" default="alpha">
|
||||||
|
Sort chronologically (newest first)
|
||||||
|
</$checkbox><br/>
|
||||||
|
<$checkbox tiddler="$:/temp/searchFields"
|
||||||
|
field="text"
|
||||||
|
checked="title" unchecked="default" default="title">
|
||||||
|
Search <<.field title>> only
|
||||||
|
</$checkbox><p/>
|
||||||
|
<$let searchSubfilter="[{$:/temp/searchFields}match[default]] :then[search[prefix]] :else[search:title[prefix]]"
|
||||||
|
sortSubfilter="[{$:/temp/searchSort}match[chrono]] :then[!nsort[modified]] :else[sort[title]]"
|
||||||
|
limit=10 >
|
||||||
|
<$list filter="[all[tiddlers]!is[system]subfilter<searchSubfilter>subfilter<sortSubfilter>first<limit>]">
|
||||||
|
<$link/> (<$text text={{{ [{!!modified}format:date[YYYY-0MM-0DD]] }}} />)<br/>
|
||||||
|
</$list>
|
||||||
|
<$list filter="[all[tiddlers]!is[system]subfilter<searchSubfilter>rest<limit>count[]]">
|
||||||
|
... and <<currentTiddler>> more.
|
||||||
|
</$list>
|
||||||
|
</$let>"""/>
|
||||||
|
|
@ -0,0 +1,71 @@
|
|||||||
|
created: 20210618133745003
|
||||||
|
from-version: 5.3.0
|
||||||
|
modified: 20230506172920710
|
||||||
|
rp-input: <<.olink all>> tiddler titles
|
||||||
|
rp-output: the output of this filter run replaces the output of previous runs unless it is an empty list (see below)
|
||||||
|
rp-purpose: replace any input to this filter run with its output, only evaluating the run when there is any input
|
||||||
|
search:
|
||||||
|
tags: [[Filter Run Prefix]] [[Filter Syntax]]
|
||||||
|
title: Then Filter Run Prefix
|
||||||
|
type: text/vnd.tiddlywiki
|
||||||
|
|
||||||
|
\define .op-row()
|
||||||
|
<$macrocall $name=".if"
|
||||||
|
cond="""$(op-body)$"""
|
||||||
|
then="""<tr><th align="left">$(op-head)$</th><td><<.op-place>>$(op-body)$</td></tr>"""
|
||||||
|
else=""/>
|
||||||
|
\end
|
||||||
|
|
||||||
|
<$list filter="[all[current]has[from-version]]" variable="listItem">
|
||||||
|
<$macrocall $name=".from-version" version={{!!from-version}}/>
|
||||||
|
</$list>
|
||||||
|
<$let op-head="" op-body="" op-name="">
|
||||||
|
<table class="doc-table">
|
||||||
|
<!-- purpose -->
|
||||||
|
<$let op-head="purpose" op-body={{!!rp-purpose}}>
|
||||||
|
<<.op-row>>
|
||||||
|
</$let>
|
||||||
|
<!-- input -->
|
||||||
|
<$let op-head="[[input|Filter Expression]]" op-body={{!!rp-input}}>
|
||||||
|
<<.op-row>>
|
||||||
|
</$let>
|
||||||
|
<!-- suffix -->
|
||||||
|
<$let op-head="suffix" op-body={{!!rp-suffix}} op-name={{!!rp-suffix-name}}>
|
||||||
|
<<.op-row>>
|
||||||
|
</$let>
|
||||||
|
<!-- output -->
|
||||||
|
<$let op-head="output" op-body={{!!rp-output}}>
|
||||||
|
<<.op-row>>
|
||||||
|
</$let>
|
||||||
|
</table>
|
||||||
|
</$let>
|
||||||
|
|
||||||
|
<$railroad text="""
|
||||||
|
\start none
|
||||||
|
\end none
|
||||||
|
":then"
|
||||||
|
[[run|"Filter Run"]]
|
||||||
|
"""/>
|
||||||
|
|
||||||
|
!Introduction
|
||||||
|
|
||||||
|
The <<.op :then>> filter run prefix is used to replace the result of all previous filter runs with its output.
|
||||||
|
|
||||||
|
If the result of all previous runs is an empty list, the <<.op :then>> prefixed filter run is not evaluated.
|
||||||
|
|
||||||
|
If the output of a <<.op :then>> prefixed filter run is itself an empty list, the result of all previous filter runs is passed through unaltered.
|
||||||
|
|
||||||
|
<<.tip "Note that a list with a single empty string item is not an empty list.">>
|
||||||
|
|
||||||
|
|
||||||
|
!! <<.op :then>> run prefix versus the <<.olink then>> operator
|
||||||
|
|
||||||
|
The major difference between the <<.op then>> operator and a <<.op :then>> prefixed filter run is that the operator will replace //each item// of the input [[Title List]] with its parameter while <<.op :then>> will replace the //whole input list// with the result of its run.
|
||||||
|
|
||||||
|
|doc-op-comparison tc-center|k
|
||||||
|
| !<<.op :then>> Filter Run Prefix | !<<.op then>> Operator |
|
||||||
|
|^<<.operator-example m1-1 "[tag[WikiText]] :then[[true]]">>|^<<.operator-example m1-2 "[tag[WikiText]then[true]]">><p>To make them equivalent, additional filter steps may be added:</p> <<.operator-example m1-3 "[tag[WikiText]count[]compare:number:gt[0]then[true]]">>|
|
||||||
|
|
||||||
|
|
||||||
|
! [[Examples|Then Filter Run Prefix (Examples)]]
|
||||||
|
|
@ -1,6 +1,6 @@
|
|||||||
caption: then
|
caption: then
|
||||||
created: 20190802112756430
|
created: 20190802112756430
|
||||||
modified: 20190802113849579
|
modified: 20230501174334627
|
||||||
op-input: a [[selection of titles|Title Selection]]
|
op-input: a [[selection of titles|Title Selection]]
|
||||||
op-output: the input titles with each one replaced by the string <<.place T>>
|
op-output: the input titles with each one replaced by the string <<.place T>>
|
||||||
op-parameter: a string
|
op-parameter: a string
|
||||||
@ -12,4 +12,6 @@ type: text/vnd.tiddlywiki
|
|||||||
|
|
||||||
<<.from-version "5.1.20">> See [[Conditional Operators]] for an overview.
|
<<.from-version "5.1.20">> See [[Conditional Operators]] for an overview.
|
||||||
|
|
||||||
|
<<.tip "The [[Then Filter Run Prefix]] has a similar purpose to the <<.op then>> operator. See its documentation for a comparison of usage.">>
|
||||||
|
|
||||||
<<.operator-examples "then">>
|
<<.operator-examples "then">>
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
created: 20130822170200000
|
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?]]
|
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: 20230326083239710
|
modified: 20230624100932287
|
||||||
tags: TableOfContents
|
tags: TableOfContents
|
||||||
title: HelloThere
|
title: HelloThere
|
||||||
type: text/vnd.tiddlywiki
|
type: text/vnd.tiddlywiki
|
||||||
|
@ -1,9 +1,10 @@
|
|||||||
created: 20160424150551727
|
created: 20160424150551727
|
||||||
modified: 20211230153027382
|
modified: 20230615114519672
|
||||||
tags: Learning
|
tags: Learning
|
||||||
title: Concatenating text and variables using macro substitution
|
title: Concatenating text and variables using macro substitution
|
||||||
type: text/vnd.tiddlywiki
|
type: text/vnd.tiddlywiki
|
||||||
|
|
||||||
|
<<.from-version "5.3.0">> It is recommended to use [[substituted attributes|Substituted Attribute Values]] or the [[substitute filter operator|substitute Operator]] to concatenate text and variables.
|
||||||
|
|
||||||
It's a frequent use case in ~TiddlyWiki that you will want to put the results of variables together with various bits of strings of text. This process in some programming languages is often referred to as "concatenating" text.
|
It's a frequent use case in ~TiddlyWiki that you will want to put the results of variables together with various bits of strings of text. This process in some programming languages is often referred to as "concatenating" text.
|
||||||
|
|
||||||
|
@ -285,6 +285,14 @@ ol.doc-github-contributors li {
|
|||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
text-overflow: ellipsis;
|
text-overflow: ellipsis;
|
||||||
}
|
}
|
||||||
|
.doc-op-comparison {
|
||||||
|
table-layout: fixed;
|
||||||
|
width: 80%;
|
||||||
|
}
|
||||||
|
.doc-op-comparison th .doc-operator {
|
||||||
|
background-color: unset;
|
||||||
|
color: #666;
|
||||||
|
}
|
||||||
.doc-tabs.tc-tab-buttons button {
|
.doc-tabs.tc-tab-buttons button {
|
||||||
font-size: 1rem;
|
font-size: 1rem;
|
||||||
padding: 0.5em;
|
padding: 0.5em;
|
||||||
|
@ -0,0 +1,16 @@
|
|||||||
|
created: 20230615045132842
|
||||||
|
modified: 20230615045231048
|
||||||
|
tags: WikiText [[Widget Attributes]]
|
||||||
|
title: Filtered Attribute Values
|
||||||
|
type: text/vnd.tiddlywiki
|
||||||
|
|
||||||
|
Filtered attribute values are indicated with triple curly braces around a [[Filter Expression]]. The value will be the first item in the resulting list, or the empty string if the list is empty.
|
||||||
|
|
||||||
|
<<.from-version "5.2.2">> To improve readability, newlines can be included anywhere that whitespace is allowed within filtered attributes.
|
||||||
|
|
||||||
|
This example shows how to add a prefix to a value:
|
||||||
|
|
||||||
|
```
|
||||||
|
<$text text={{{ [<currentTiddler>addprefix[$:/myprefix/]] }}} />
|
||||||
|
```
|
||||||
|
<<.warning "The value of the attribute will be the exact text from the first item in the resulting list. Any wiki syntax in that text will be left as-is.">>
|
@ -1,6 +1,6 @@
|
|||||||
caption: HTML
|
caption: HTML
|
||||||
created: 20131205160816081
|
created: 20131205160816081
|
||||||
modified: 20230115100934146
|
modified: 20230615060119987
|
||||||
tags: WikiText
|
tags: WikiText
|
||||||
title: HTML in WikiText
|
title: HTML in WikiText
|
||||||
type: text/vnd.tiddlywiki
|
type: text/vnd.tiddlywiki
|
||||||
@ -58,12 +58,13 @@ If you do not close any other tag then it will behave as if the missing closing
|
|||||||
|
|
||||||
! Attributes
|
! Attributes
|
||||||
|
|
||||||
In an extension of conventional HTML syntax, attributes of elements/widgets can be specified in several different ways:
|
In an extension of conventional HTML syntax, attributes of elements and widgets can be specified in [[several different ways|Widget Attributes]]:
|
||||||
|
|
||||||
* a literal string
|
* [[a literal string|Literal Attribute Values]]
|
||||||
* a transclusion of a TextReference
|
* [[a transclusion of a textReference|Transcluded Attribute Values]]
|
||||||
* a transclusion of a [[macro/variable|Macros]]
|
* [[a transclusion of a macro/variable|Transcluded Attribute Values]]
|
||||||
* as the result of a [[Filter Expression]]
|
* [[as the result of a filter expression|Filtered Attribute Values]]
|
||||||
|
* <<.from-version "5.3.0">> [[as the result of performing filter and variable substitutions on the given string|Substituted Attribute Values]]
|
||||||
|
|
||||||
!! Style Attributes
|
!! Style Attributes
|
||||||
|
|
||||||
@ -85,64 +86,10 @@ The advantage of this syntax is that it simplifies assigning computed values to
|
|||||||
<div style.color={{!!color}}>Hello</div>
|
<div style.color={{!!color}}>Hello</div>
|
||||||
```
|
```
|
||||||
|
|
||||||
!! Literal Attribute Values
|
|
||||||
|
|
||||||
Literal attribute values can use several different styles of quoting:
|
|
||||||
|
|
||||||
* Single quotes (eg `attr='value'`)
|
|
||||||
* Double quotes (eg `attr="value"`)
|
|
||||||
* Tripe double quotes (eg `attr="""value"""`)
|
|
||||||
* No quoting is necessary for values that do not contain spaces (eg `attr=value`)
|
|
||||||
|
|
||||||
Literal attribute values can include line breaks. For example:
|
|
||||||
|
|
||||||
```
|
|
||||||
<div data-address="Mouse House,
|
|
||||||
Mouse Lane,
|
|
||||||
Rodentville,
|
|
||||||
Ratland."/>
|
|
||||||
```
|
|
||||||
|
|
||||||
By using triple-double quotes you can specify attribute values that contain single double quotes. For example:
|
|
||||||
|
|
||||||
```
|
|
||||||
<div data-address="""Mouse House,
|
|
||||||
"Mouse" Lane,
|
|
||||||
Rodentville,
|
|
||||||
Ratland."""/>
|
|
||||||
```
|
|
||||||
|
|
||||||
!! Transcluded Attribute Values
|
|
||||||
|
|
||||||
Transcluded attribute values are indicated with double curly braces around a TextReference. For example:
|
|
||||||
|
|
||||||
```
|
|
||||||
attr={{tiddler}}
|
|
||||||
attr={{!!field}}
|
|
||||||
attr={{tiddler!!field}}
|
|
||||||
```
|
|
||||||
<<.warning "The value of the attribute value will be the exact text retrieved from the TextReference. Any wiki syntax in that text will be left as-is.">>
|
|
||||||
|
|
||||||
!! Variable Attribute Values
|
|
||||||
|
|
||||||
Variable attribute values are indicated with double angle brackets around a [[macro invocation|Macro Calls]]. For example:
|
|
||||||
|
|
||||||
```
|
|
||||||
<div title=<<MyMacro "Brian">>>
|
|
||||||
...
|
|
||||||
</div>
|
|
||||||
```
|
|
||||||
<<.warning "The text from the definition of the macro will be retrieved and text substitution will be performed (i.e. <<.param $param$>> and <<.param $(...)$>> syntax). The value of the attribute value will be the resulting text. Any wiki syntax in that text (including further macro calls and variable references) will be left as-is.">>
|
|
||||||
|
|
||||||
!! Filtered Attribute Values
|
|
||||||
|
|
||||||
Filtered attribute values are indicated with triple curly braces around a [[Filter Expression]]. The value will be the first item in the resulting list, or the empty string if the list is empty.
|
|
||||||
|
|
||||||
<<.from-version "5.2.2">> To improve readability, newlines can be included anywhere that whitespace is allowed within filtered attributes.
|
|
||||||
|
|
||||||
This example shows how to add a prefix to a value:
|
|
||||||
|
|
||||||
```
|
|
||||||
<$text text={{{ [<currentTiddler>addprefix[$:/myprefix/]] }}} />
|
|
||||||
```
|
|
||||||
<<.warning "The value of the attribute will be the exact text from the first item in the resulting list. Any wiki syntax in that text will be left as-is.">>
|
|
||||||
|
@ -0,0 +1,30 @@
|
|||||||
|
created: 20230615045409162
|
||||||
|
modified: 20230615045432768
|
||||||
|
tags: [[Widget Attributes]] WikiText
|
||||||
|
title: Literal Attribute Values
|
||||||
|
type: text/vnd.tiddlywiki
|
||||||
|
|
||||||
|
Literal attribute values can use several different styles of quoting:
|
||||||
|
|
||||||
|
* Single quotes (eg `attr='value'`)
|
||||||
|
* Double quotes (eg `attr="value"`)
|
||||||
|
* Tripe double quotes (eg `attr="""value"""`)
|
||||||
|
* No quoting is necessary for values that do not contain spaces (eg `attr=value`)
|
||||||
|
|
||||||
|
Literal attribute values can include line breaks. For example:
|
||||||
|
|
||||||
|
```
|
||||||
|
<div data-address="Mouse House,
|
||||||
|
Mouse Lane,
|
||||||
|
Rodentville,
|
||||||
|
Ratland."/>
|
||||||
|
```
|
||||||
|
|
||||||
|
By using triple-double quotes you can specify attribute values that contain single double quotes. For example:
|
||||||
|
|
||||||
|
```
|
||||||
|
<div data-address="""Mouse House,
|
||||||
|
"Mouse" Lane,
|
||||||
|
Rodentville,
|
||||||
|
Ratland."""/>
|
||||||
|
```
|
@ -0,0 +1,45 @@
|
|||||||
|
base-url: http://tiddlywiki.com/
|
||||||
|
created: 20230615050814821
|
||||||
|
modified: 20230615173033918
|
||||||
|
tags: [[Widget Attributes]] WikiText
|
||||||
|
title: Substituted Attribute Values
|
||||||
|
type: text/vnd.tiddlywiki
|
||||||
|
|
||||||
|
<<.from-version "5.3.0">>
|
||||||
|
Substituted attribute values can use two different styles of quoting:
|
||||||
|
|
||||||
|
* Single backticks <$codeblock code="attr=`value`"/>
|
||||||
|
* Triple backticks <$codeblock code="attr=```value```"/>
|
||||||
|
|
||||||
|
The value of the attribute will be the text denoted by the backticks with any of the placeholders for filter expressions and variables substituted with their corresponding values. Filter expression placeholders are substituted before variable placeholders, allowing for further variable substitution in their returned value.
|
||||||
|
|
||||||
|
<<.warning "Any other wiki syntax in that text will be left as-is.">>
|
||||||
|
|
||||||
|
|
||||||
|
|placeholder syntax|description|h
|
||||||
|
|`$(varname)$`|Text substitution of a variable. Undefined variables are replaced with an empty string. |
|
||||||
|
|`${ filter expression }$`|Text substitution with the first result of evaluating the filter expression. |
|
||||||
|
|
||||||
|
! Examples
|
||||||
|
|
||||||
|
!! Substituting a variable value into a string
|
||||||
|
|
||||||
|
<$macrocall $name=wikitext-example-without-html src='<$text text=`Hello there this is the tiddler "$(currentTiddler)$"`/>'/>
|
||||||
|
|
||||||
|
|
||||||
|
!! Substituting a variable value and the result of evaluating a filter expression into a string
|
||||||
|
<$macrocall $name=wikitext-example-without-html src='<$text text=`This tiddler is titled "$(currentTiddler)$" and was last modified on ${[{!!modified}format:date[DDth MMM YYYY]]}$`/>'/>
|
||||||
|
|
||||||
|
!! Concatenating strings and variables to create a URL
|
||||||
|
|
||||||
|
<$macrocall $name=wikitext-example-without-html src='
|
||||||
|
<$let hash={{{ [<currentTiddler>encodeuricomponent[]] }}}>
|
||||||
|
<a href=`http://tiddlywiki.com/#$(hash)$`>this tiddler on tiddlywiki.com</a>
|
||||||
|
</$let>'/>
|
||||||
|
|
||||||
|
!! Concatenating variables and a text reference to create a URL
|
||||||
|
|
||||||
|
<$macrocall $name=wikitext-example-without-html src='
|
||||||
|
<$let hash={{{ [<currentTiddler>encodeuricomponent[]] }}}>
|
||||||
|
<a href=`${ [{!!base-url}] }$#$(hash)$`>this tiddler on tiddlywiki.com</a>
|
||||||
|
</$let>'/>
|
@ -0,0 +1,14 @@
|
|||||||
|
created: 20230615045327830
|
||||||
|
modified: 20230615045353826
|
||||||
|
tags: [[Widget Attributes]] WikiText
|
||||||
|
title: Transcluded Attribute Values
|
||||||
|
type: text/vnd.tiddlywiki
|
||||||
|
|
||||||
|
Transcluded attribute values are indicated with double curly braces around a TextReference. For example:
|
||||||
|
|
||||||
|
```
|
||||||
|
attr={{tiddler}}
|
||||||
|
attr={{!!field}}
|
||||||
|
attr={{tiddler!!field}}
|
||||||
|
```
|
||||||
|
<<.warning "The value of the attribute value will be the exact text retrieved from the TextReference. Any wiki syntax in that text will be left as-is.">>
|
@ -0,0 +1,14 @@
|
|||||||
|
created: 20230615045239825
|
||||||
|
modified: 20230615045312961
|
||||||
|
tags: [[Widget Attributes]] WikiText
|
||||||
|
title: Variable Attribute Values
|
||||||
|
type: text/vnd.tiddlywiki
|
||||||
|
|
||||||
|
Variable attribute values are indicated with double angle brackets around a [[macro invocation|Macro Calls]]. For example:
|
||||||
|
|
||||||
|
```
|
||||||
|
<div title=<<MyMacro "Brian">>>
|
||||||
|
...
|
||||||
|
</div>
|
||||||
|
```
|
||||||
|
<<.warning "The text from the definition of the macro will be retrieved and text substitution will be performed (i.e. <<.param $param$>> and <<.param $(...)$>> syntax). The value of the attribute value will be the resulting text. Any wiki syntax in that text (including further macro calls and variable references) will be left as-is.">>
|
21
editions/tw5.com/tiddlers/wikitext/Widget Attributes.tid
Normal file
21
editions/tw5.com/tiddlers/wikitext/Widget Attributes.tid
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
created: 20230615045526689
|
||||||
|
modified: 20230615060059476
|
||||||
|
tags: WikiText
|
||||||
|
title: Widget Attributes
|
||||||
|
type: text/vnd.tiddlywiki
|
||||||
|
|
||||||
|
Attributes of HTML elements and widgets can be specified in several different ways:
|
||||||
|
|
||||||
|
* [[a literal string|Literal Attribute Values]]
|
||||||
|
* [[a transclusion of a textReference|Transcluded Attribute Values]]
|
||||||
|
* [[a transclusion of a macro/variable|Transcluded Attribute Values]]
|
||||||
|
* [[as the result of a filter expression|Filtered Attribute Values]]
|
||||||
|
* <<.from-version "5.3.0">> [[as the result of performing filter and variable substitutions on the given string|Substituted Attribute Values]]
|
||||||
|
|
||||||
|
|attribute type|syntax|h
|
||||||
|
|literal |single, double or triple quotes or no quotes for values without spaces |
|
||||||
|
|transcluded |double curly braces around a text reference |
|
||||||
|
|variable |double angle brackets around a macro or variable invocation |
|
||||||
|
|filtered |triple curly braces around a filter expression|
|
||||||
|
|substituted|single or triple backticks around the text to be processed for substitutions|
|
||||||
|
|
@ -67,6 +67,8 @@ More/Caption: mehr
|
|||||||
More/Hint: Weitere Aktionen
|
More/Hint: Weitere Aktionen
|
||||||
NewHere/Caption: Neu hier
|
NewHere/Caption: Neu hier
|
||||||
NewHere/Hint: Erstelle einen neuen Tiddler, der mit dem Namen dieses Tiddlers getaggt ist
|
NewHere/Hint: Erstelle einen neuen Tiddler, der mit dem Namen dieses Tiddlers getaggt ist
|
||||||
|
NetworkActivity/Caption: Netzwerk Aktivität
|
||||||
|
NetworkActivity/Hint: Alle offen Netwerk Anfragen beenden
|
||||||
NewJournal/Caption: Neues Journal
|
NewJournal/Caption: Neues Journal
|
||||||
NewJournal/Hint: Erstelle einen neuen Journal-Tiddler
|
NewJournal/Hint: Erstelle einen neuen Journal-Tiddler
|
||||||
NewJournalHere/Caption: Neues Journal hier
|
NewJournalHere/Caption: Neues Journal hier
|
||||||
|
@ -1,11 +1,13 @@
|
|||||||
title: $:/language/Docs/Fields/
|
title: $:/language/Docs/Fields/
|
||||||
|
|
||||||
_canonical_uri: Die komplette URI eines externen Foto Tiddlers. URI = Uniform Resource Identifier, Identifikator für Ressourcen im Internet.
|
_canonical_uri: Die komplette URI eines externen Foto Tiddlers. URI = Uniform Resource Identifier, Identifikator für Ressourcen im Internet.
|
||||||
|
author: Name des Plugin-Authors
|
||||||
bag: Der Name eines ~TiddlyWeb "bags" von dem der Tiddler kam.
|
bag: Der Name eines ~TiddlyWeb "bags" von dem der Tiddler kam.
|
||||||
code-body: Das "View Template" wird den Tiddler Text als "Code" anzeigen, wenn dieses Feld auf: ''"yes"'' gesetzt wird.
|
|
||||||
caption: Der Text, der auf "Tab-Buttons" angezeigt wird.
|
caption: Der Text, der auf "Tab-Buttons" angezeigt wird.
|
||||||
|
code-body: Das "View Template" wird den Tiddler Text als "Code" anzeigen, wenn dieses Feld auf: ''"yes"'' gesetzt wird.
|
||||||
color: Der CSS Farbwert, der mit einem Tiddler assoziiert wird.
|
color: Der CSS Farbwert, der mit einem Tiddler assoziiert wird.
|
||||||
component: Der Name einer Komponente, die für eine [[Alarm Anzeige|AlertMechanism]] verantwortlich ist.
|
component: Der Name einer Komponente, die für eine [[Alarm Anzeige|AlertMechanism]] verantwortlich ist.
|
||||||
|
core-version: Zeigt die TiddlyWiki Version an, ab der ein Plugin verwendet werden kann.
|
||||||
current-tiddler: Wird verwendet um den "obersten" Tiddler in der [[Tiddler Historie|HistoryMechanism]] zwischen zu speichern.
|
current-tiddler: Wird verwendet um den "obersten" Tiddler in der [[Tiddler Historie|HistoryMechanism]] zwischen zu speichern.
|
||||||
created: Datum an dem der Tiddler erstellt wurde.
|
created: Datum an dem der Tiddler erstellt wurde.
|
||||||
creator: Name des Erstellers dieses Tiddlers.
|
creator: Name des Erstellers dieses Tiddlers.
|
||||||
@ -22,7 +24,9 @@ list-before: Dient zum Einfügen von Tiddler Titeln in das "list" Feld. Wenn ges
|
|||||||
list-after: Dient zum Einfügen von Tiddler Titeln in das "list" Feld. Wenn gesetzt, wird der neue Tiddler ''nach'' dem hier definierten Tiddler in die Liste eingefügt.
|
list-after: Dient zum Einfügen von Tiddler Titeln in das "list" Feld. Wenn gesetzt, wird der neue Tiddler ''nach'' dem hier definierten Tiddler in die Liste eingefügt.
|
||||||
modified: Datum, an dem der Tiddler zuletzt verändert wurde.
|
modified: Datum, an dem der Tiddler zuletzt verändert wurde.
|
||||||
modifier: Name der Person, die den Tiddler zuletzt verändert hat.
|
modifier: Name der Person, die den Tiddler zuletzt verändert hat.
|
||||||
|
module-type: Zeigt den Modul-typ bei JavaScript Tiddlern an.
|
||||||
name: Ein Menschen lesbarer Name für einen "plugin" Tiddler.
|
name: Ein Menschen lesbarer Name für einen "plugin" Tiddler.
|
||||||
|
parent-plugin: Enthält den Namen des Übergeordneten Plugins.
|
||||||
plugin-priority: Ein numerischer Wert, der die Priorität eines "plugins" festlegt.
|
plugin-priority: Ein numerischer Wert, der die Priorität eines "plugins" festlegt.
|
||||||
plugin-type: Der Typ eines "plugins".
|
plugin-type: Der Typ eines "plugins".
|
||||||
revision: Die Revisionsnummer eines Tiddlers. Wird von einem Server vergeben.
|
revision: Die Revisionsnummer eines Tiddlers. Wird von einem Server vergeben.
|
||||||
|
@ -24,9 +24,10 @@ Hinweis: Die österreichische und deutsche Version unterscheiden sich momentan n
|
|||||||
|
|
||||||
<div class="tc-control-panel">
|
<div class="tc-control-panel">
|
||||||
|
|
||||||
|<$link to="$:/SiteTitle"><<lingo Title/Prompt>></$link> |<$edit-text tiddler="$:/SiteTitle" default="" tag="input"/> |
|
|tc-table-no-border tc-first-col-min-width tc-first-link-nowrap|k
|
||||||
|<$link to="$:/SiteSubtitle"><<lingo Subtitle/Prompt>></$link> |<$edit-text tiddler="$:/SiteSubtitle" default="" tag="input"/> |
|
| <$link to="$:/SiteTitle"><<lingo Title/Prompt>></$link>|<$edit-text tiddler="$:/SiteTitle" default="" tag="input"/> |
|
||||||
|<$link to="$:/DefaultTiddlers"><<lingo DefaultTiddlers/Prompt>></$link> |<<lingo DefaultTiddlers/TopHint>><br> <$edit-text tag="textarea" tiddler="$:/DefaultTiddlers"/><br>//<<lingo DefaultTiddlers/BottomHint>>// |
|
| <$link to="$:/SiteSubtitle"><<lingo Subtitle/Prompt>></$link>|<$edit-text tiddler="$:/SiteSubtitle" default="" tag="input"/> |
|
||||||
|
|^ <$link to="$:/DefaultTiddlers"><<lingo DefaultTiddlers/Prompt>></$link><br><<lingo DefaultTiddlers/TopHint>>| <$edit-text tag="textarea" tiddler="$:/DefaultTiddlers"/><br>//<<lingo DefaultTiddlers/BottomHint>>// |
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
See the [[control panel|$:/ControlPanel]] for more options.
|
See the [[control panel|$:/ControlPanel]] for more options.
|
||||||
|
@ -20,7 +20,7 @@ Mögliche Parameter:
|
|||||||
* ''anon-username'' - Name, der für anonymer Benutzer verwendet wird, um bearbeitete Tiddler zu markieren
|
* ''anon-username'' - Name, der für anonymer Benutzer verwendet wird, um bearbeitete Tiddler zu markieren
|
||||||
* ''username'' - Benutzername für die Basis-Authentifizierung
|
* ''username'' - Benutzername für die Basis-Authentifizierung
|
||||||
* ''password'' - Passwort für die Basis-Authentifizierung
|
* ''password'' - Passwort für die Basis-Authentifizierung
|
||||||
* ''authenticated-user-header'' - HTTP Header-Name für vertrauenswürdige, authentifizierte Benutzer
|
* ''authenticated-user-header'' - Optionaler HTTP Header-Name für vertrauenswürdige, authentifizierte Benutzer
|
||||||
* ''readers'' - Komma-separierte Liste für Benutzer, mit Schreiberlaubnis
|
* ''readers'' - Komma-separierte Liste für Benutzer, mit Schreiberlaubnis
|
||||||
* ''writers'' - Komma-separierte Liste für Benutzer, mit Leseerlaubnis
|
* ''writers'' - Komma-separierte Liste für Benutzer, mit Leseerlaubnis
|
||||||
* ''csrf-disable'' - "yes" bedeutet, dass CSRF checks deaktiviert sind. (Standard: "no")
|
* ''csrf-disable'' - "yes" bedeutet, dass CSRF checks deaktiviert sind. (Standard: "no")
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
title: $:/language/Import/
|
title: $:/language/Import/
|
||||||
|
|
||||||
Editor/Import/Heading: Bilder in den Editor importieren.
|
Editor/Import/Heading: Bilder in den Editor importieren.
|
||||||
Imported/Hint: Folgende Tiddler wurden importiert:
|
Imported/Hint: Folgende Tiddler wurden importiert:
|
||||||
|
@ -25,6 +25,8 @@ Encryption/RepeatPassword: Passwort wiederholen
|
|||||||
Encryption/PasswordNoMatch: Passwörter stimmen nicht überein
|
Encryption/PasswordNoMatch: Passwörter stimmen nicht überein
|
||||||
Encryption/SetPassword: Passwort setzen
|
Encryption/SetPassword: Passwort setzen
|
||||||
Error/Caption: Fehler
|
Error/Caption: Fehler
|
||||||
|
Error/DeserializeOperator/MissingOperand: Filter Fehler: Fehlender Operand für 'deserialize' Operator
|
||||||
|
Error/DeserializeOperator/UnknownDeserializer: Filter Fehler: Unbekannter "deserializer" als Operand für 'deserialize' Operator verwendet
|
||||||
Error/Filter: Filter Fehler
|
Error/Filter: Filter Fehler
|
||||||
Error/FilterSyntax: Syntax Fehler im Filter-Ausdruck
|
Error/FilterSyntax: Syntax Fehler im Filter-Ausdruck
|
||||||
Error/FilterRunPrefix: Filter Fehler: Unbekanntes Prefix für Filter lauf
|
Error/FilterRunPrefix: Filter Fehler: Unbekanntes Prefix für Filter lauf
|
||||||
@ -40,6 +42,7 @@ Error/RetrievingSkinny: Fehler beim Empfangen einer "skinny" Tiddler Liste
|
|||||||
Error/SavingToTWEdit: Fehler beim Speichern mit "TWEdit"
|
Error/SavingToTWEdit: Fehler beim Speichern mit "TWEdit"
|
||||||
Error/WhileSaving: Fehler beim Speichern
|
Error/WhileSaving: Fehler beim Speichern
|
||||||
Error/XMLHttpRequest: XMLHttpRequest Fehler-Code
|
Error/XMLHttpRequest: XMLHttpRequest Fehler-Code
|
||||||
|
Error/ZoominTextNode: "Story View Error:" Es scheint Sie versuchen mit einem Tiddler zu interagieren, der in einem speziellen Container angezeigt wird. Dies wird wahrscheinlich durch den Tag: `$:/tags/StoryTiddlerTemplateFilter`verursacht. Wahrscheinlich enthält das Template reinen Text oder Leerzeilen am Anfang. Verwenden Sie das "Pragma" `\whitespace trim` oder stellen Sie sicher, dass der Template Inhalt in einem HTML-Element "eingeschlossen" ist. Der Text, der den Fehler verursacht ist:
|
||||||
InternalJavaScriptError/Title: Interner JavaScript Fehler
|
InternalJavaScriptError/Title: Interner JavaScript Fehler
|
||||||
InternalJavaScriptError/Hint: Es tut uns leid, aber bitte starten Sie Ihr TiddlyWiki neu, indem sie die Seite im Browser neu laden.
|
InternalJavaScriptError/Hint: Es tut uns leid, aber bitte starten Sie Ihr TiddlyWiki neu, indem sie die Seite im Browser neu laden.
|
||||||
LayoutSwitcher/Description: "Layout" Selektor anzeigen
|
LayoutSwitcher/Description: "Layout" Selektor anzeigen
|
||||||
|
@ -1,3 +1,3 @@
|
|||||||
title: $:/SiteTitle
|
title: $:/SiteTitle
|
||||||
|
|
||||||
Mein ~TiddlyWiki
|
Mein TiddlyWiki
|
@ -3,6 +3,6 @@ tags: $:/tags/TextEditor/Snippet
|
|||||||
caption: Makro Definition
|
caption: Makro Definition
|
||||||
|
|
||||||
\define makroName(param1:"standard parameter", param2)
|
\define makroName(param1:"standard parameter", param2)
|
||||||
Text des Makros. Zugriff auf den $param1$.
|
Text des Makros. Zugriff auf den <<__param1__>>.
|
||||||
$param2$
|
<<__param2__>>
|
||||||
\end
|
\end
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
title: $:/language/Snippets/Table4x3
|
title: $:/language/Snippets/Table4x3
|
||||||
tags: $:/tags/TextEditor/Snippet
|
tags: $:/tags/TextEditor/Snippet
|
||||||
caption: Tabelle mit 5 Spalten, 4 Zeilen, Kopf- und Fußzeile
|
caption: Tabelle -- 5 Spalten, 3 Zeilen, Kopf-, Fußzeile und Beschriftung
|
||||||
|
|
||||||
| |Alpha |Beta |Gamma |Delta |h
|
| |Alpha |Beta |Gamma |Delta |h
|
||||||
|!Beta | | | | |
|
|!Beta | | | | |
|
||||||
|
@ -59,12 +59,16 @@ Home/Caption: accueil
|
|||||||
Home/Hint: Ouvre les tiddlers par défaut
|
Home/Hint: Ouvre les tiddlers par défaut
|
||||||
Language/Caption: langue
|
Language/Caption: langue
|
||||||
Language/Hint: Choix de la langue pour l'interface utilisateur
|
Language/Hint: Choix de la langue pour l'interface utilisateur
|
||||||
|
LayoutSwitcher/Hint: Choix de la mise en page
|
||||||
|
LayoutSwitcher/Caption: mise en page
|
||||||
Manager/Caption: gestionnaire de tiddlers
|
Manager/Caption: gestionnaire de tiddlers
|
||||||
Manager/Hint: Ouvre le gestionnaire de tiddlers
|
Manager/Hint: Ouvre le gestionnaire de tiddlers
|
||||||
More/Caption: plus
|
More/Caption: plus
|
||||||
More/Hint: Actions supplémentaires
|
More/Hint: Actions supplémentaires
|
||||||
NewHere/Caption: nouveau, à partir d'ici
|
NewHere/Caption: nouveau, à partir d'ici
|
||||||
NewHere/Hint: Crée un nouveau tiddler avec pour tag le titre du tiddler courant
|
NewHere/Hint: Crée un nouveau tiddler avec pour tag le titre du tiddler courant
|
||||||
|
NetworkActivity/Caption: activité réseau
|
||||||
|
NetworkActivity/Hint: Annule toute l'activité réseau
|
||||||
NewJournal/Caption: nouveau journal
|
NewJournal/Caption: nouveau journal
|
||||||
NewJournal/Hint: Crée un nouveau tiddler journal
|
NewJournal/Hint: Crée un nouveau tiddler journal
|
||||||
NewJournalHere/Caption: nouveau journal, à partir d'ici
|
NewJournalHere/Caption: nouveau journal, à partir d'ici
|
||||||
|
@ -1,11 +1,13 @@
|
|||||||
title: $:/language/Docs/Fields/
|
title: $:/language/Docs/Fields/
|
||||||
|
|
||||||
_canonical_uri: L'URI complet vers le contenu externe d'un tiddler image
|
_canonical_uri: L'URI complet vers le contenu externe d'un tiddler image
|
||||||
|
author: Nom de l'auteur d'un plugin
|
||||||
bag: Nom du <q>bag</q> d'où provient le tiddler
|
bag: Nom du <q>bag</q> d'où provient le tiddler
|
||||||
caption: Texte à afficher sur un onglet ou un bouton
|
caption: Texte à afficher sur un onglet ou un bouton
|
||||||
code-body: Le template de visualisation affichera ce tiddler comme du code si la valeur est ''yes''
|
code-body: Le template de visualisation affichera ce tiddler comme du code si la valeur est ''yes''
|
||||||
color: Couleur CSS associée au tiddler
|
color: Couleur CSS associée au tiddler
|
||||||
component: Nom du composant responsable pour un [[tiddler d'alerte|AlertMechanism]]
|
component: Nom du composant responsable pour un [[tiddler d'alerte|AlertMechanism]]
|
||||||
|
core-version: Dans le cas d'un plugin, indique la version de TiddlyWiki avec laquelle il est compatible
|
||||||
current-tiddler: Sert à cacher le tiddler situé au début de l'[[historique|HistoryMechanism]]
|
current-tiddler: Sert à cacher le tiddler situé au début de l'[[historique|HistoryMechanism]]
|
||||||
created: Date de création du tiddler
|
created: Date de création du tiddler
|
||||||
creator: Nom de l'utilisateur qui a créé le tiddler
|
creator: Nom de l'utilisateur qui a créé le tiddler
|
||||||
@ -13,7 +15,7 @@ dependents: Quand le tiddler est un plugin, énumère les titres des plugins dé
|
|||||||
description: Texte de description d'un plugin, ou d'une boîte de dialogue
|
description: Texte de description d'un plugin, ou d'une boîte de dialogue
|
||||||
draft.of: Pour les tiddlers en cours d'édition, contient le titre du tiddler initial
|
draft.of: Pour les tiddlers en cours d'édition, contient le titre du tiddler initial
|
||||||
draft.title: Pour les tiddlers en cours d'édition, contient le nouveau titre prévu pour le tiddler
|
draft.title: Pour les tiddlers en cours d'édition, contient le nouveau titre prévu pour le tiddler
|
||||||
footer: Texte de bas de page dans le cas d'un wizard
|
footer: Texte de bas de page dans le cas d'une fenêtre modale
|
||||||
hide-body: Le template de visualisation cachera le corps des tiddlers si la valeur est ''yes''
|
hide-body: Le template de visualisation cachera le corps des tiddlers si la valeur est ''yes''
|
||||||
icon: Titre du tiddler contenant l'icone associée à un tiddler
|
icon: Titre du tiddler contenant l'icone associée à un tiddler
|
||||||
library: Si la valeur est <q>yes</q>, indique qu'un tiddler doit être sauvegardé comme bibliothèque JavaScript
|
library: Si la valeur est <q>yes</q>, indique qu'un tiddler doit être sauvegardé comme bibliothèque JavaScript
|
||||||
@ -22,13 +24,15 @@ list-before: Si présent, contient le titre du tiddler avant lequel ce tiddler d
|
|||||||
list-after: Si présent, contient le titre du tiddler après lequel ce tiddler doit être ajouté dans la liste ordonnée des titres de tiddlers.
|
list-after: Si présent, contient le titre du tiddler après lequel ce tiddler doit être ajouté dans la liste ordonnée des titres de tiddlers.
|
||||||
modified: Date et heure à laquelle le tiddler a été modifié pour la dernière fois
|
modified: Date et heure à laquelle le tiddler a été modifié pour la dernière fois
|
||||||
modifier: Titre du tiddler associé à l'utilisateur qui a modifié ce tiddler pour la dernière fois
|
modifier: Titre du tiddler associé à l'utilisateur qui a modifié ce tiddler pour la dernière fois
|
||||||
name: Dans le cas d'un tiddler provenant d'un plugin, le nom de la personne associée à ce tiddler
|
module-type: Pour les tiddlers javascript, spécifie de quel type est ce module
|
||||||
plugin-priority: Dans le cas d'un tiddler provenant d'un plugin, un nombre indiquant la priorité de ce tiddler
|
name: Dans le cas d'un tiddler plugin, le nom associé à ce plugin
|
||||||
plugin-type: Dans le cas d'un tiddler provenant d'un plugin, le type du plugin
|
parent-plugin: Dans le cas d'un tiddler plugin, spécifie de quel plugin il est un sous-plugin
|
||||||
|
plugin-priority: Dans le cas d'un tiddler plugin, un nombre indiquant sa priorité
|
||||||
|
plugin-type: Dans le cas d'un tiddler plugin, le type du plugin
|
||||||
revision: Numéro de révision du tiddler présent sur le serveur
|
revision: Numéro de révision du tiddler présent sur le serveur
|
||||||
released: Date de version d'un TiddlyWiki
|
released: Date de version d'un TiddlyWiki
|
||||||
source: URL source associée à ce tiddler
|
source: URL source associée à ce tiddler
|
||||||
subtitle: Texte du sous-titre pour un wizard
|
subtitle: Texte du sous-titre pour une fenêtre modale
|
||||||
tags: Liste des tags associés à un tiddler
|
tags: Liste des tags associés à un tiddler
|
||||||
text: Texte du corps de ce tiddler
|
text: Texte du corps de ce tiddler
|
||||||
throttle.refresh: Si présent, ralentit les rafraîchissements de ce tiddler
|
throttle.refresh: Si présent, ralentit les rafraîchissements de ce tiddler
|
||||||
|
18
languages/fr-FR/Help/commands.tid
Normal file
18
languages/fr-FR/Help/commands.tid
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
title: $:/language/Help/commands
|
||||||
|
description: Lance les commandes retournées par un filtre
|
||||||
|
|
||||||
|
Lance la séquence des commandes retournées par un filtre
|
||||||
|
|
||||||
|
```
|
||||||
|
--commands <filtre>
|
||||||
|
```
|
||||||
|
|
||||||
|
Exemples
|
||||||
|
|
||||||
|
```
|
||||||
|
--commands "[enlist{$:/commandes-build-sous-forme-de-texte}]"
|
||||||
|
```
|
||||||
|
|
||||||
|
```
|
||||||
|
--commands "[{$:/commandes-build-sous-forme-json}jsonindexes[]] :map[{$:/commandes-build-sous-forme-json}jsonget<currentTiddler>]"
|
||||||
|
```
|
@ -25,6 +25,8 @@ Encryption/RepeatPassword: Répéter le mot de passe
|
|||||||
Encryption/PasswordNoMatch: Les mots de passe ne correspondent pas
|
Encryption/PasswordNoMatch: Les mots de passe ne correspondent pas
|
||||||
Encryption/SetPassword: Définir ce mot de passe
|
Encryption/SetPassword: Définir ce mot de passe
|
||||||
Error/Caption: Erreur
|
Error/Caption: Erreur
|
||||||
|
Error/DeserializeOperator/MissingOperand: Erreur de filtre: opérande manquant pour l'opérateur 'deserialize'
|
||||||
|
Error/DeserializeOperator/UnknownDeserializer: Erreur de filtre: l'opérateur 'deserialize' a pour opérande un désérialiseur inconnu
|
||||||
Error/Filter: Erreur de filtre
|
Error/Filter: Erreur de filtre
|
||||||
Error/FilterSyntax: Erreur de syntaxe dans l'expression du filtre
|
Error/FilterSyntax: Erreur de syntaxe dans l'expression du filtre
|
||||||
Error/FilterRunPrefix: Erreur de filtre : Préfixe de run inconnu pour le filtre
|
Error/FilterRunPrefix: Erreur de filtre : Préfixe de run inconnu pour le filtre
|
||||||
@ -40,6 +42,7 @@ Error/RetrievingSkinny: Erreur pendant la récupération de la liste des tiddler
|
|||||||
Error/SavingToTWEdit: Erreur lors de l'enregistrement vers TWEdit
|
Error/SavingToTWEdit: Erreur lors de l'enregistrement vers TWEdit
|
||||||
Error/WhileSaving: Erreur lors de l'enregistrement
|
Error/WhileSaving: Erreur lors de l'enregistrement
|
||||||
Error/XMLHttpRequest: Code d'erreur XMLHttpRequest
|
Error/XMLHttpRequest: Code d'erreur XMLHttpRequest
|
||||||
|
Error/ZoominTextNode: Erreur de visualisation dans le déroulé : il semble que vous cherchiez à interagir avec un tiddler qui s'affiche dans un containeur personnalisé. Le problème vient probablement de l'utilisation de `$:/tags/StoryTiddlerTemplateFilter` avec un template qui commence par du texte ou des espaces. Merci d'utiliser le pragma `\whitespace trim` et de vous assurer que tout le contenu du tiddler est inclus dans un seul élément HTML. Voici le texte à l'origine du problème :
|
||||||
InternalJavaScriptError/Title: Erreur interne JavaScript
|
InternalJavaScriptError/Title: Erreur interne JavaScript
|
||||||
InternalJavaScriptError/Hint: C'est assez embarrassant. Il est recommandé de rafraîchir l'affichage de votre navigateur
|
InternalJavaScriptError/Hint: C'est assez embarrassant. Il est recommandé de rafraîchir l'affichage de votre navigateur
|
||||||
LayoutSwitcher/Description: Ouvre le commutateur de mise en page
|
LayoutSwitcher/Description: Ouvre le commutateur de mise en page
|
||||||
|
@ -161,7 +161,7 @@ function CodeMirrorEngine(options) {
|
|||||||
if (cm.state.draggingText && cm.doc.sel.contains(pos) > -1) {
|
if (cm.state.draggingText && cm.doc.sel.contains(pos) > -1) {
|
||||||
cm.state.draggingText(event);
|
cm.state.draggingText(event);
|
||||||
// Ensure the editor is re-focused
|
// Ensure the editor is re-focused
|
||||||
setTimeout(() => cm.display.input.focus(), 20);
|
setTimeout(function() {cm.display.input.focus();}, 20);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
|
Loading…
Reference in New Issue
Block a user