mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2026-01-22 19:04:38 +00:00
Compare commits
54 Commits
v5.3.1
...
button-wid
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
5ce2601c10 | ||
|
|
fb57eab2f4 | ||
|
|
ac797734de | ||
|
|
bbda31d2d3 | ||
|
|
142bc19a29 | ||
|
|
f7a94879da | ||
|
|
e43a75ae59 | ||
|
|
65b3b18e1f | ||
|
|
980022a6e7 | ||
|
|
a5d5926534 | ||
|
|
a1bffa7e36 | ||
|
|
793692a4e4 | ||
|
|
08d6560391 | ||
|
|
70774eca83 | ||
|
|
4f0e148bf1 | ||
|
|
b4896d79d8 | ||
|
|
1eceb5f47f | ||
|
|
def508a220 | ||
|
|
d17525ec8e | ||
|
|
5bb8155422 | ||
|
|
bb2973fc29 | ||
|
|
bbaa0890b5 | ||
|
|
b4a862c618 | ||
|
|
1be8f0a933 | ||
|
|
773c1f83f2 | ||
|
|
8effb3f218 | ||
|
|
780e5d33a4 | ||
|
|
526e997aa4 | ||
|
|
e4d8849f22 | ||
|
|
bd99cf3385 | ||
|
|
711d1658e2 | ||
|
|
b82f012c0c | ||
|
|
f383863654 | ||
|
|
697dc8db4c | ||
|
|
49c96901f3 | ||
|
|
7d8766d2b9 | ||
|
|
6255856205 | ||
|
|
6f307ae01e | ||
|
|
213a850715 | ||
|
|
217af20fcd | ||
|
|
6d0b4108a4 | ||
|
|
642f8da6ed | ||
|
|
e16635a5ad | ||
|
|
db79bf2380 | ||
|
|
2b16fa7b5c | ||
|
|
64c9d17181 | ||
|
|
ceee20fd59 | ||
|
|
0889f13fef | ||
|
|
fa9bfa07a0 | ||
|
|
dbe233fc87 | ||
|
|
3965e2c027 | ||
|
|
c22cd3f4c6 | ||
|
|
dc282db31b | ||
|
|
70309c67d1 |
@@ -5,7 +5,7 @@
|
||||
# Default to the current version number for building the plugin library
|
||||
|
||||
if [ -z "$TW5_BUILD_VERSION" ]; then
|
||||
TW5_BUILD_VERSION=v5.3.1
|
||||
TW5_BUILD_VERSION=v5.3.2
|
||||
fi
|
||||
|
||||
echo "Using TW5_BUILD_VERSION as [$TW5_BUILD_VERSION]"
|
||||
@@ -104,13 +104,15 @@ node $TW5_BUILD_TIDDLYWIKI \
|
||||
--build favicon static index \
|
||||
|| exit 1
|
||||
|
||||
# /empty.html Empty
|
||||
# /empty.hta For Internet Explorer
|
||||
# /empty.html Empty
|
||||
# /empty.hta For Internet Explorer
|
||||
# /empty-external-core.html External core empty
|
||||
# /tiddlywikicore-<version>.js Core plugin javascript
|
||||
node $TW5_BUILD_TIDDLYWIKI \
|
||||
./editions/empty \
|
||||
--verbose \
|
||||
--output $TW5_BUILD_OUTPUT \
|
||||
--build empty \
|
||||
--build empty emptyexternalcore \
|
||||
|| exit 1
|
||||
|
||||
|
||||
|
||||
12
boot/boot.js
12
boot/boot.js
@@ -2674,6 +2674,18 @@ $tw.hooks.addHook = function(hookName,definition) {
|
||||
}
|
||||
};
|
||||
|
||||
/*
|
||||
Delete hooks from the hashmap
|
||||
*/
|
||||
$tw.hooks.removeHook = function(hookName,definition) {
|
||||
if($tw.utils.hop($tw.hooks.names,hookName)) {
|
||||
var p = $tw.hooks.names[hookName].indexOf(definition);
|
||||
if(p !== -1) {
|
||||
$tw.hooks.names[hookName].splice(p, 1);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
/*
|
||||
Invoke the hook by key
|
||||
*/
|
||||
|
||||
@@ -3,4 +3,4 @@ title: $:/language/Exporters/
|
||||
StaticRiver: Static HTML
|
||||
JsonFile: JSON file
|
||||
CsvFile: CSV file
|
||||
TidFile: ".tid" file
|
||||
TidFile: TID text file
|
||||
|
||||
@@ -19,7 +19,7 @@ The following options are supported:
|
||||
** ''yes'' will "explode" plugins into separate tiddler files and save them to the plugin directory within the wiki folder
|
||||
** ''no'' will suppress exploding plugins into their constituent tiddler files. It will save the plugin as a single JSON tiddler in the tiddlers folder
|
||||
|
||||
Note that both ''explodePlugins'' options will produce wiki folders that build the same exact same original wiki. The difference lies in how plugins are represented in the wiki folder.
|
||||
Note that both ''explodePlugins'' options will produce wiki folders that build the exact same original wiki. The difference lies in how plugins are represented in the wiki folder.
|
||||
|
||||
A common usage is to convert a TiddlyWiki HTML file into a wiki folder:
|
||||
|
||||
@@ -31,4 +31,4 @@ Save the plugin to the tiddlers directory of the target wiki folder:
|
||||
|
||||
```
|
||||
tiddlywiki --load ./mywiki.html --savewikifolder ./mywikifolder explodePlugins=no
|
||||
```
|
||||
```
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
title: $:/language/Help/server
|
||||
description: Provides an HTTP server interface to TiddlyWiki (deprecated in favour of the new listen command)
|
||||
description: (deprecated: see 'listen' command) Provides an HTTP server interface to TiddlyWiki
|
||||
|
||||
Legacy command to serve a wiki over HTTP.
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
title: $:/language/Docs/Types/image/svg+xml
|
||||
description: Structured Vector Graphics image
|
||||
description: SVG image
|
||||
name: image/svg+xml
|
||||
group: Image
|
||||
group-sort: 1
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
title: $:/language/Docs/Types/image/x-icon
|
||||
description: ICO format icon file
|
||||
description: ICO icon
|
||||
name: image/x-icon
|
||||
group: Image
|
||||
group-sort: 1
|
||||
|
||||
@@ -60,7 +60,7 @@ function FramedEngine(options) {
|
||||
this.domNode.value = this.value;
|
||||
}
|
||||
// Set the attributes
|
||||
if(this.widget.editType) {
|
||||
if(this.widget.editType && this.widget.editTag !== "textarea") {
|
||||
this.domNode.setAttribute("type",this.widget.editType);
|
||||
}
|
||||
if(this.widget.editPlaceholder) {
|
||||
|
||||
@@ -34,7 +34,7 @@ function SimpleEngine(options) {
|
||||
this.domNode.value = this.value;
|
||||
}
|
||||
// Set the attributes
|
||||
if(this.widget.editType) {
|
||||
if(this.widget.editType && this.widget.editTag !== "textarea") {
|
||||
this.domNode.setAttribute("type",this.widget.editType);
|
||||
}
|
||||
if(this.widget.editPlaceholder) {
|
||||
|
||||
@@ -28,12 +28,8 @@ function getAllFilterOperators() {
|
||||
Export our filter function
|
||||
*/
|
||||
exports.all = function(source,operator,options) {
|
||||
// Get our suboperators
|
||||
var allFilterOperators = getAllFilterOperators();
|
||||
// Cycle through the suboperators accumulating their results
|
||||
var results = new $tw.utils.LinkedList(),
|
||||
subops = operator.operand.split("+");
|
||||
// Check for common optimisations
|
||||
var subops = operator.operand.split("+");
|
||||
if(subops.length === 1 && subops[0] === "") {
|
||||
return source;
|
||||
} else if(subops.length === 1 && subops[0] === "tiddlers") {
|
||||
@@ -46,6 +42,10 @@ exports.all = function(source,operator,options) {
|
||||
return options.wiki.eachShadowPlusTiddlers;
|
||||
}
|
||||
// Do it the hard way
|
||||
// Get our suboperators
|
||||
var allFilterOperators = getAllFilterOperators();
|
||||
// Cycle through the suboperators accumulating their results
|
||||
var results = new $tw.utils.LinkedList();
|
||||
for(var t=0; t<subops.length; t++) {
|
||||
var subop = allFilterOperators[subops[t]];
|
||||
if(subop) {
|
||||
|
||||
@@ -104,7 +104,11 @@ TW_Element.prototype.setAttribute = function(name,value) {
|
||||
if(this.isRaw) {
|
||||
throw "Cannot setAttribute on a raw TW_Element";
|
||||
}
|
||||
this.attributes[name] = value + "";
|
||||
if(name === "style") {
|
||||
this.style = value;
|
||||
} else {
|
||||
this.attributes[name] = value + "";
|
||||
}
|
||||
};
|
||||
|
||||
TW_Element.prototype.setAttributeNS = function(namespace,name,value) {
|
||||
|
||||
@@ -70,6 +70,11 @@ BrowseWidget.prototype.render = function(parent,nextSibling) {
|
||||
}
|
||||
return false;
|
||||
},false);
|
||||
// Assign data- attributes
|
||||
this.assignAttributes(domNode,{
|
||||
sourcePrefix: "data-",
|
||||
destPrefix: "data-"
|
||||
});
|
||||
// Insert element
|
||||
parent.insertBefore(domNode,nextSibling);
|
||||
this.renderChildren(domNode,null);
|
||||
@@ -95,6 +100,11 @@ BrowseWidget.prototype.execute = function() {
|
||||
Selectively refreshes the widget if needed. Returns true if the widget or any of its children needed re-rendering
|
||||
*/
|
||||
BrowseWidget.prototype.refresh = function(changedTiddlers) {
|
||||
var changedAttributes = this.computeAttributes();
|
||||
if($tw.utils.count(changedAttributes) > 0) {
|
||||
this.refreshSelf();
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
};
|
||||
|
||||
|
||||
@@ -59,6 +59,11 @@ ButtonWidget.prototype.render = function(parent,nextSibling) {
|
||||
$tw.utils.pushTop(classes,"tc-popup-handle");
|
||||
}
|
||||
domNode.className = classes.join(" ");
|
||||
// Assign data- attributes
|
||||
this.assignAttributes(domNode,{
|
||||
sourcePrefix: "data-",
|
||||
destPrefix: "data-"
|
||||
});
|
||||
// Assign other attributes
|
||||
if(this.style) {
|
||||
domNode.setAttribute("style",this.style);
|
||||
@@ -250,7 +255,7 @@ ButtonWidget.prototype.updateDomNodeClasses = function() {
|
||||
//Add new classes from updated class attribute.
|
||||
$tw.utils.pushTop(domNodeClasses,newClasses);
|
||||
this.domNode.className = domNodeClasses.join(" ");
|
||||
}
|
||||
};
|
||||
|
||||
/*
|
||||
Selectively refreshes the widget if needed. Returns true if the widget or any of its children needed re-rendering
|
||||
@@ -260,8 +265,15 @@ ButtonWidget.prototype.refresh = function(changedTiddlers) {
|
||||
if(changedAttributes.actions || changedAttributes.to || changedAttributes.message || changedAttributes.param || changedAttributes.set || changedAttributes.setTo || changedAttributes.popup || changedAttributes.hover || changedAttributes.selectedClass || changedAttributes.style || changedAttributes.dragFilter || changedAttributes.dragTiddler || (this.set && changedTiddlers[this.set]) || (this.popup && changedTiddlers[this.popup]) || (this.popupTitle && changedTiddlers[this.popupTitle]) || changedAttributes.popupAbsCoords || changedAttributes.setTitle || changedAttributes.setField || changedAttributes.setIndex || changedAttributes.popupTitle || changedAttributes.disabled || changedAttributes["default"]) {
|
||||
this.refreshSelf();
|
||||
return true;
|
||||
} else if(changedAttributes["class"]) {
|
||||
this.updateDomNodeClasses();
|
||||
} else {
|
||||
if(changedAttributes["class"]) {
|
||||
this.updateDomNodeClasses();
|
||||
}
|
||||
this.assignAttributes(this.domNodes[0],{
|
||||
changedAttributes: changedAttributes,
|
||||
sourcePrefix: "data-",
|
||||
destPrefix: "data-"
|
||||
});
|
||||
}
|
||||
return this.refreshChildren(changedTiddlers);
|
||||
};
|
||||
|
||||
@@ -53,6 +53,11 @@ CheckboxWidget.prototype.render = function(parent,nextSibling) {
|
||||
this.labelDomNode.appendChild(this.inputDomNode);
|
||||
this.spanDomNode = this.document.createElement("span");
|
||||
this.labelDomNode.appendChild(this.spanDomNode);
|
||||
// Assign data- attributes
|
||||
this.assignAttributes(this.inputDomNode,{
|
||||
sourcePrefix: "data-",
|
||||
destPrefix: "data-"
|
||||
});
|
||||
// Add a click event handler
|
||||
$tw.utils.addEventListeners(this.inputDomNode,[
|
||||
{name: "change", handlerObject: this, handlerMethod: "handleChangeEvent"}
|
||||
@@ -325,6 +330,11 @@ CheckboxWidget.prototype.refresh = function(changedTiddlers) {
|
||||
$tw.utils.removeClass(this.labelDomNode,"tc-checkbox-checked");
|
||||
}
|
||||
}
|
||||
this.assignAttributes(this.inputDomNode,{
|
||||
changedAttributes: changedAttributes,
|
||||
sourcePrefix: "data-",
|
||||
destPrefix: "data-"
|
||||
});
|
||||
return this.refreshChildren(changedTiddlers) || refreshed;
|
||||
}
|
||||
};
|
||||
@@ -332,3 +342,4 @@ CheckboxWidget.prototype.refresh = function(changedTiddlers) {
|
||||
exports.checkbox = CheckboxWidget;
|
||||
|
||||
})();
|
||||
|
||||
@@ -52,6 +52,11 @@ DraggableWidget.prototype.render = function(parent,nextSibling) {
|
||||
classes.push("tc-draggable");
|
||||
}
|
||||
domNode.setAttribute("class",classes.join(" "));
|
||||
// Assign data- attributes and style. attributes
|
||||
this.assignAttributes(domNode,{
|
||||
sourcePrefix: "data-",
|
||||
destPrefix: "data-"
|
||||
});
|
||||
// Insert the node into the DOM and render any children
|
||||
parent.insertBefore(domNode,nextSibling);
|
||||
this.renderChildren(domNode,null);
|
||||
@@ -108,13 +113,19 @@ DraggableWidget.prototype.updateDomNodeClasses = function() {
|
||||
Selectively refreshes the widget if needed. Returns true if the widget or any of its children needed re-rendering
|
||||
*/
|
||||
DraggableWidget.prototype.refresh = function(changedTiddlers) {
|
||||
var changedAttributes = this.computeAttributes(),
|
||||
changedAttributesCount = $tw.utils.count(changedAttributes);
|
||||
if(changedAttributesCount === 1 && changedAttributes["class"]) {
|
||||
this.updateDomNodeClasses();
|
||||
} else if(changedAttributesCount > 0) {
|
||||
var changedAttributes = this.computeAttributes();
|
||||
if(changedAttributes.tag || changedAttributes.selector || changedAttributes.dragimagetype || changedAttributes.enable || changedAttributes.startactions || changedAttributes.endactions) {
|
||||
this.refreshSelf();
|
||||
return true;
|
||||
} else {
|
||||
if(changedAttributes["class"]) {
|
||||
this.assignDomNodeClasses();
|
||||
}
|
||||
this.assignAttributes(this.domNodes[0],{
|
||||
changedAttributes: changedAttributes,
|
||||
sourcePrefix: "data-",
|
||||
destPrefix: "data-"
|
||||
});
|
||||
}
|
||||
return this.refreshChildren(changedTiddlers);
|
||||
};
|
||||
|
||||
@@ -42,6 +42,11 @@ DroppableWidget.prototype.render = function(parent,nextSibling) {
|
||||
domNode = this.document.createElement(tag);
|
||||
this.domNode = domNode;
|
||||
this.assignDomNodeClasses();
|
||||
// Assign data- attributes and style. attributes
|
||||
this.assignAttributes(domNode,{
|
||||
sourcePrefix: "data-",
|
||||
destPrefix: "data-"
|
||||
});
|
||||
// Add event handlers
|
||||
if(this.droppableEnable) {
|
||||
$tw.utils.addEventListeners(domNode,[
|
||||
@@ -166,8 +171,15 @@ DroppableWidget.prototype.refresh = function(changedTiddlers) {
|
||||
if(changedAttributes.tag || changedAttributes.enable || changedAttributes.disabledClass || changedAttributes.actions || changedAttributes.effect) {
|
||||
this.refreshSelf();
|
||||
return true;
|
||||
} else if(changedAttributes["class"]) {
|
||||
this.assignDomNodeClasses();
|
||||
} else {
|
||||
if(changedAttributes["class"]) {
|
||||
this.assignDomNodeClasses();
|
||||
}
|
||||
this.assignAttributes(this.domNodes[0],{
|
||||
changedAttributes: changedAttributes,
|
||||
sourcePrefix: "data-",
|
||||
destPrefix: "data-"
|
||||
});
|
||||
}
|
||||
return this.refreshChildren(changedTiddlers);
|
||||
};
|
||||
|
||||
@@ -43,6 +43,11 @@ LinkWidget.prototype.render = function(parent,nextSibling) {
|
||||
} else {
|
||||
// Just insert the link text
|
||||
var domNode = this.document.createElement("span");
|
||||
// Assign data- attributes
|
||||
this.assignAttributes(domNode,{
|
||||
sourcePrefix: "data-",
|
||||
destPrefix: "data-"
|
||||
});
|
||||
parent.insertBefore(domNode,nextSibling);
|
||||
this.renderChildren(domNode,null);
|
||||
this.domNodes.push(domNode);
|
||||
@@ -138,6 +143,11 @@ LinkWidget.prototype.renderLink = function(parent,nextSibling) {
|
||||
widget: this
|
||||
});
|
||||
}
|
||||
// Assign data- attributes
|
||||
this.assignAttributes(domNode,{
|
||||
sourcePrefix: "data-",
|
||||
destPrefix: "data-"
|
||||
});
|
||||
// Insert the link into the DOM and render any children
|
||||
parent.insertBefore(domNode,nextSibling);
|
||||
this.renderChildren(domNode,null);
|
||||
@@ -207,8 +217,7 @@ Selectively refreshes the widget if needed. Returns true if the widget or any of
|
||||
*/
|
||||
LinkWidget.prototype.refresh = function(changedTiddlers) {
|
||||
var changedAttributes = this.computeAttributes();
|
||||
if(changedAttributes.to || changedTiddlers[this.to] || changedAttributes["aria-label"] || changedAttributes.tooltip ||
|
||||
changedAttributes["class"] || changedAttributes.tabindex || changedAttributes.draggable || changedAttributes.tag) {
|
||||
if($tw.utils.count(changedAttributes) > 0) {
|
||||
this.refreshSelf();
|
||||
return true;
|
||||
}
|
||||
@@ -218,3 +227,4 @@ LinkWidget.prototype.refresh = function(changedTiddlers) {
|
||||
exports.link = LinkWidget;
|
||||
|
||||
})();
|
||||
|
||||
@@ -225,6 +225,8 @@ ListWidget.prototype.handleListChanges = function(changedTiddlers) {
|
||||
// If we are providing an counter variable then we must refresh the items, otherwise we can rearrange them
|
||||
var hasRefreshed = false,t;
|
||||
if(this.counterName) {
|
||||
var mustRefreshOldLast = false;
|
||||
var oldLength = this.children.length;
|
||||
// Cycle through the list and remove and re-insert the first item that has changed, and all the remaining items
|
||||
for(t=0; t<this.list.length; t++) {
|
||||
if(hasRefreshed || !this.children[t] || this.children[t].parseTreeNode.itemTitle !== this.list[t]) {
|
||||
@@ -232,6 +234,9 @@ ListWidget.prototype.handleListChanges = function(changedTiddlers) {
|
||||
this.removeListItem(t);
|
||||
}
|
||||
this.insertListItem(t,this.list[t]);
|
||||
if(!hasRefreshed && t === oldLength) {
|
||||
mustRefreshOldLast = true;
|
||||
}
|
||||
hasRefreshed = true;
|
||||
} else {
|
||||
// Refresh the item we're reusing
|
||||
@@ -239,6 +244,12 @@ ListWidget.prototype.handleListChanges = function(changedTiddlers) {
|
||||
hasRefreshed = hasRefreshed || refreshed;
|
||||
}
|
||||
}
|
||||
// If items were inserted then we must recreate the item that used to be at the last position as it is no longer last
|
||||
if(mustRefreshOldLast && oldLength > 0) {
|
||||
var oldLastIdx = oldLength-1;
|
||||
this.removeListItem(oldLastIdx);
|
||||
this.insertListItem(oldLastIdx,this.list[oldLastIdx]);
|
||||
}
|
||||
// If there are items to remove and we have not refreshed then recreate the item that will now be at the last position
|
||||
if(!hasRefreshed && this.children.length > this.list.length) {
|
||||
this.removeListItem(this.list.length-1);
|
||||
|
||||
@@ -40,6 +40,10 @@ RadioWidget.prototype.render = function(parent,nextSibling) {
|
||||
);
|
||||
this.inputDomNode = this.document.createElement("input");
|
||||
this.inputDomNode.setAttribute("type","radio");
|
||||
this.assignAttributes(this.inputDomNode,{
|
||||
sourcePrefix: "data-",
|
||||
destPrefix: "data-"
|
||||
});
|
||||
if(isChecked) {
|
||||
this.inputDomNode.checked = true;
|
||||
}
|
||||
|
||||
@@ -50,6 +50,10 @@ RangeWidget.prototype.render = function(parent,nextSibling) {
|
||||
this.inputDomNode.setAttribute("disabled",true);
|
||||
}
|
||||
this.inputDomNode.value = this.getValue();
|
||||
this.assignAttributes(this.inputDomNode,{
|
||||
sourcePrefix: "data-",
|
||||
destPrefix: "data-"
|
||||
});
|
||||
// Add a click event handler
|
||||
$tw.utils.addEventListeners(this.inputDomNode,[
|
||||
{name:"mousedown", handlerObject:this, handlerMethod:"handleMouseDownEvent"},
|
||||
|
||||
@@ -40,7 +40,31 @@ SelectWidget.prototype.render = function(parent,nextSibling) {
|
||||
this.parentDomNode = parent;
|
||||
this.computeAttributes();
|
||||
this.execute();
|
||||
this.renderChildren(parent,nextSibling);
|
||||
//Create element
|
||||
var domNode = this.document.createElement("select");
|
||||
if(this.selectClass) {
|
||||
domNode.classname = this.selectClass;
|
||||
}
|
||||
// Assign data- attributes
|
||||
this.assignAttributes(domNode,{
|
||||
sourcePrefix: "data-",
|
||||
destPrefix: "data-"
|
||||
});
|
||||
if(this.selectMultiple) {
|
||||
domNode.setAttribute("multiple","multiple");
|
||||
}
|
||||
if(this.selectSize) {
|
||||
domNode.setAttribute("size",this.selectSize);
|
||||
}
|
||||
if(this.selectTabindex) {
|
||||
domNode.setAttribute("tabindex",this.selectTabindex);
|
||||
}
|
||||
if(this.selectTooltip) {
|
||||
domNode.setAttribute("title",this.selectTooltip);
|
||||
}
|
||||
this.renderChildren(domNode,nextSibling);
|
||||
this.parentDomNode.insertBefore(domNode,nextSibling);
|
||||
this.domNodes.push(domNode);
|
||||
this.setSelectValue();
|
||||
if(this.selectFocus == "yes") {
|
||||
this.getSelectDomNode().focus();
|
||||
@@ -113,7 +137,7 @@ SelectWidget.prototype.setSelectValue = function() {
|
||||
Get the DOM node of the select element
|
||||
*/
|
||||
SelectWidget.prototype.getSelectDomNode = function() {
|
||||
return this.children[0].domNodes[0];
|
||||
return this.domNodes[0];
|
||||
};
|
||||
|
||||
// Return an array of the selected opion values
|
||||
@@ -149,27 +173,7 @@ SelectWidget.prototype.execute = function() {
|
||||
this.selectTooltip = this.getAttribute("tooltip");
|
||||
this.selectFocus = this.getAttribute("focus");
|
||||
// Make the child widgets
|
||||
var selectNode = {
|
||||
type: "element",
|
||||
tag: "select",
|
||||
children: this.parseTreeNode.children
|
||||
};
|
||||
if(this.selectClass) {
|
||||
$tw.utils.addAttributeToParseTreeNode(selectNode,"class",this.selectClass);
|
||||
}
|
||||
if(this.selectMultiple) {
|
||||
$tw.utils.addAttributeToParseTreeNode(selectNode,"multiple","multiple");
|
||||
}
|
||||
if(this.selectSize) {
|
||||
$tw.utils.addAttributeToParseTreeNode(selectNode,"size",this.selectSize);
|
||||
}
|
||||
if(this.selectTabindex) {
|
||||
$tw.utils.addAttributeToParseTreeNode(selectNode,"tabindex",this.selectTabindex);
|
||||
}
|
||||
if(this.selectTooltip) {
|
||||
$tw.utils.addAttributeToParseTreeNode(selectNode,"title",this.selectTooltip);
|
||||
}
|
||||
this.makeChildWidgets([selectNode]);
|
||||
this.makeChildWidgets();
|
||||
};
|
||||
|
||||
/*
|
||||
@@ -178,17 +182,21 @@ Selectively refreshes the widget if needed. Returns true if the widget or any of
|
||||
SelectWidget.prototype.refresh = function(changedTiddlers) {
|
||||
var changedAttributes = this.computeAttributes();
|
||||
// If we're using a different tiddler/field/index then completely refresh ourselves
|
||||
if(changedAttributes.tiddler || changedAttributes.field || changedAttributes.index || changedAttributes.tooltip) {
|
||||
if(changedAttributes.tiddler || changedAttributes.field || changedAttributes.index || changedAttributes.tooltip || changedAttributes.tabindex) {
|
||||
this.refreshSelf();
|
||||
return true;
|
||||
// If the target tiddler value has changed, just update setting and refresh the children
|
||||
} else {
|
||||
if(changedAttributes.class) {
|
||||
this.selectClass = this.getAttribute("class");
|
||||
this.getSelectDomNode().setAttribute("class",this.selectClass);
|
||||
}
|
||||
|
||||
this.assignAttributes(this.getSelectDomNode(),{
|
||||
changedAttributes: changedAttributes,
|
||||
sourcePrefix: "data-",
|
||||
destPrefix: "data-"
|
||||
});
|
||||
var childrenRefreshed = this.refreshChildren(changedTiddlers);
|
||||
// If the target tiddler value has changed, just update setting and refresh the children
|
||||
if(changedTiddlers[this.selectTitle] || childrenRefreshed) {
|
||||
this.setSelectValue();
|
||||
}
|
||||
|
||||
@@ -413,16 +413,34 @@ Widget.prototype.getAttribute = function(name,defaultText) {
|
||||
};
|
||||
|
||||
/*
|
||||
Assign the computed attributes of the widget to a domNode
|
||||
Assign the common attributes of the widget to a domNode
|
||||
options include:
|
||||
excludeEventAttributes: ignores attributes whose name begins with "on"
|
||||
sourcePrefix: prefix of attributes that are to be directly assigned (defaults to the empty string meaning all attributes)
|
||||
destPrefix: prefix to be applied to attribute names that are to be directly assigned (defaults to the emtpy string which means no prefix is added)
|
||||
changedAttributes: hashmap by attribute name of attributes to process (if missing, process all attributes)
|
||||
excludeEventAttributes: ignores attributes whose name would begin with "on"
|
||||
*/
|
||||
Widget.prototype.assignAttributes = function(domNode,options) {
|
||||
options = options || {};
|
||||
var self = this;
|
||||
var self = this,
|
||||
changedAttributes = options.changedAttributes || this.attributes,
|
||||
sourcePrefix = options.sourcePrefix || "",
|
||||
destPrefix = options.destPrefix || "",
|
||||
EVENT_ATTRIBUTE_PREFIX = "on";
|
||||
var assignAttribute = function(name,value) {
|
||||
// Process any style attributes before considering sourcePrefix and destPrefix
|
||||
if(name.substr(0,6) === "style." && name.length > 6) {
|
||||
domNode.style[$tw.utils.unHyphenateCss(name.substr(6))] = value;
|
||||
return;
|
||||
}
|
||||
// Check if the sourcePrefix is a match
|
||||
if(name.substr(0,sourcePrefix.length) === sourcePrefix) {
|
||||
name = destPrefix + name.substr(sourcePrefix.length);
|
||||
} else {
|
||||
value = undefined;
|
||||
}
|
||||
// Check for excluded attribute names
|
||||
if(options.excludeEventAttributes && name.substr(0,2) === "on") {
|
||||
if(options.excludeEventAttributes && name.substr(0,2).toLowerCase() === EVENT_ATTRIBUTE_PREFIX) {
|
||||
value = undefined;
|
||||
}
|
||||
if(value !== undefined) {
|
||||
@@ -432,26 +450,24 @@ Widget.prototype.assignAttributes = function(domNode,options) {
|
||||
namespace = "http://www.w3.org/1999/xlink";
|
||||
name = name.substr(6);
|
||||
}
|
||||
// Handle styles
|
||||
if(name.substr(0,6) === "style." && name.length > 6) {
|
||||
domNode.style[$tw.utils.unHyphenateCss(name.substr(6))] = value;
|
||||
} else {
|
||||
// Setting certain attributes can cause a DOM error (eg xmlns on the svg element)
|
||||
try {
|
||||
domNode.setAttributeNS(namespace,name,value);
|
||||
} catch(e) {
|
||||
}
|
||||
// Setting certain attributes can cause a DOM error (eg xmlns on the svg element)
|
||||
try {
|
||||
domNode.setAttributeNS(namespace,name,value);
|
||||
} catch(e) {
|
||||
}
|
||||
}
|
||||
}
|
||||
// Not all parse tree nodes have the orderedAttributes property
|
||||
};
|
||||
// If the parse tree node has the orderedAttributes property then use that order
|
||||
if(this.parseTreeNode.orderedAttributes) {
|
||||
$tw.utils.each(this.parseTreeNode.orderedAttributes,function(attribute,index) {
|
||||
assignAttribute(attribute.name,self.attributes[attribute.name]);
|
||||
});
|
||||
if(attribute.name in changedAttributes) {
|
||||
assignAttribute(attribute.name,self.getAttribute(attribute.name));
|
||||
}
|
||||
});
|
||||
// Otherwise update each changed attribute irrespective of order
|
||||
} else {
|
||||
$tw.utils.each(Object.keys(self.attributes).sort(),function(name) {
|
||||
assignAttribute(name,self.attributes[name]);
|
||||
$tw.utils.each(changedAttributes,function(value,name) {
|
||||
assignAttribute(name,self.getAttribute(name));
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
@@ -10,7 +10,7 @@ first-search-filter: [all[shadows+tiddlers]prefix[$:/language/Docs/Types/]sort[d
|
||||
<em class="tc-edit tc-small-gap-right"><<lingo Type/Prompt>></em>
|
||||
<div class="tc-type-selector-dropdown-wrapper">
|
||||
<div class="tc-type-selector"><$fieldmangler>
|
||||
<$macrocall $name="keyboard-driven-input" tiddler=<<currentTiddler>> storeTitle=<<typeInputTiddler>> refreshTitle=<<refreshTitle>> selectionStateTitle=<<typeSelectionTiddler>> field="type" tag="input" default="" placeholder={{$:/language/EditTemplate/Type/Placeholder}} focusPopup=<<qualify "$:/state/popup/type-dropdown">> class="tc-edit-typeeditor tc-edit-texteditor tc-popup-handle" tabindex={{$:/config/EditTabIndex}} focus={{{ [{$:/config/AutoFocus}match[type]then[true]] ~[[false]] }}} cancelPopups="yes" configTiddlerFilter="[[$:/core/ui/EditTemplate/type]]" inputCancelActions=<<input-cancel-actions>>/><$button popup=<<qualify "$:/state/popup/type-dropdown">> class="tc-btn-invisible tc-btn-dropdown tc-small-gap" tooltip={{$:/language/EditTemplate/Type/Dropdown/Hint}} aria-label={{$:/language/EditTemplate/Type/Dropdown/Caption}}>{{$:/core/images/down-arrow}}</$button><$button message="tm-remove-field" param="type" class="tc-btn-invisible tc-btn-icon" tooltip={{$:/language/EditTemplate/Type/Delete/Hint}} aria-label={{$:/language/EditTemplate/Type/Delete/Caption}}>{{$:/core/images/delete-button}}<$action-deletetiddler $filter="[<storeTitle>] [<refreshTitle>] [<selectionStateTitle>]"/></$button>
|
||||
<$macrocall $name="keyboard-driven-input" tiddler=<<currentTiddler>> storeTitle=<<typeInputTiddler>> refreshTitle=<<refreshTitle>> selectionStateTitle=<<typeSelectionTiddler>> field="type" tag="input" default="" placeholder={{$:/language/EditTemplate/Type/Placeholder}} focusPopup=<<qualify "$:/state/popup/type-dropdown">> class="tc-edit-typeeditor tc-edit-texteditor tc-popup-handle" tabindex={{$:/config/EditTabIndex}} focus={{{ [{$:/config/AutoFocus}match[type]then[true]] ~[[false]] }}} cancelPopups="yes" configTiddlerFilter="[[$:/core/ui/EditTemplate/type]]" inputCancelActions=<<input-cancel-actions>>/><$button popup=<<qualify "$:/state/popup/type-dropdown">> class="tc-btn-invisible tc-btn-dropdown tc-small-gap" tooltip={{$:/language/EditTemplate/Type/Dropdown/Hint}} aria-label={{$:/language/EditTemplate/Type/Dropdown/Caption}}>{{$:/core/images/down-arrow}}</$button><$button message="tm-remove-field" param="type" class="tc-btn-invisible tc-btn-icon" tooltip={{$:/language/EditTemplate/Type/Delete/Hint}} aria-label={{$:/language/EditTemplate/Type/Delete/Caption}}>{{$:/core/images/delete-button}}<$action-deletetiddler $filter="[<typeInputTiddler>] [<storeTitle>] [<refreshTitle>] [<selectionStateTitle>]"/></$button>
|
||||
</$fieldmangler></div>
|
||||
|
||||
<div class="tc-block-dropdown-wrapper">
|
||||
|
||||
@@ -20,7 +20,7 @@ code-body: yes
|
||||
|
||||
<$navigator story="$:/StoryList" history="$:/HistoryList" openLinkFromInsideRiver={{$:/config/Navigation/openLinkFromInsideRiver}} openLinkFromOutsideRiver={{$:/config/Navigation/openLinkFromOutsideRiver}} relinkOnRename={{$:/config/RelinkOnRename}}>
|
||||
|
||||
<$dropzone enable=<<tv-enable-drag-and-drop>>>
|
||||
<$dropzone enable=<<tv-enable-drag-and-drop>> class="tc-dropzone tc-page-container-inner">
|
||||
|
||||
<$list filter="[all[shadows+tiddlers]tag[$:/tags/PageTemplate]!has[draft.of]]" variable="listItem">
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
title: $:/config/OfficialPluginLibrary
|
||||
tags: $:/tags/PluginLibrary
|
||||
url: https://tiddlywiki.com/library/v5.3.1/index.html
|
||||
url: https://tiddlywiki.com/library/v5.3.2/index.html
|
||||
caption: {{$:/language/OfficialPluginLibrary}}
|
||||
|
||||
{{$:/language/OfficialPluginLibrary/Hint}}
|
||||
|
||||
@@ -4,7 +4,15 @@ code-body: yes
|
||||
|
||||
\define tabs-button()
|
||||
\whitespace trim
|
||||
<$button set=<<tabsState>> setTo=<<currentTab>> default=<<__default__>> selectedClass="tc-tab-selected" tooltip={{!!tooltip}} role="switch">
|
||||
<$button
|
||||
set=<<tabsState>>
|
||||
setTo=<<currentTab>>
|
||||
default=<<__default__>>
|
||||
selectedClass="tc-tab-selected"
|
||||
tooltip={{!!tooltip}}
|
||||
role="switch"
|
||||
data-tab-title=<<currentTab>>
|
||||
>
|
||||
<$tiddler tiddler=<<save-currentTiddler>>>
|
||||
<$set name="tv-wikilinks" value="no">
|
||||
<$transclude tiddler=<<__buttonTemplate__>> mode="inline">
|
||||
|
||||
@@ -10,7 +10,7 @@ color:$(foregroundColor)$;
|
||||
<!-- 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)
|
||||
\whitespace trim
|
||||
<$vars
|
||||
<$let
|
||||
foregroundColor=<<contrastcolour target:"""$colour$""" fallbackTarget:"""$fallbackTarget$""" colourA:"""$colourA$""" colourB:"""$colourB$""">>
|
||||
backgroundColor=<<__colour__>>
|
||||
>
|
||||
@@ -23,6 +23,7 @@ color:$(foregroundColor)$;
|
||||
<$transclude tiddler=<<__icon__>>/>
|
||||
<$view tiddler=<<__tag__>> field="title" format="text" />
|
||||
</$element-tag$>
|
||||
</$let>
|
||||
\end
|
||||
|
||||
\define tag-pill-body(tag,icon,colour,palette,element-tag,element-attributes,actions)
|
||||
|
||||
@@ -1,9 +1,14 @@
|
||||
created: 20141122200310516
|
||||
modified: 20201213161842776
|
||||
modified: 20230923031318421
|
||||
tags: Mechanisms
|
||||
title: HookMechanism
|
||||
type: text/vnd.tiddlywiki
|
||||
|
||||
The hook mechanism provides a way for plugins to intercept and modify default functionality. Hooks are added as follows:
|
||||
The hook mechanism provides a way for plugins to intercept and modify default functionality.
|
||||
|
||||
!! Add a hook
|
||||
|
||||
Hooks are added as follows:
|
||||
|
||||
```js
|
||||
/*
|
||||
@@ -13,6 +18,8 @@ handler: function to be called when hook is invoked
|
||||
$tw.hooks.addHook(name,handler);
|
||||
```
|
||||
|
||||
!!! Params and return
|
||||
|
||||
The handler function will be called with parameters that depend on the specific hook in question, but they always follow the pattern `handler(value,params...)`
|
||||
|
||||
* ''value'': an optional value that is to be transformed by the hook function
|
||||
@@ -20,11 +27,29 @@ The handler function will be called with parameters that depend on the specific
|
||||
|
||||
If required by the hook in question, the handler function must return the modified ''value''.
|
||||
|
||||
!!! Multiple handlers
|
||||
|
||||
Multiple handlers can be assigned to the same name using repeated calls. When a hook is invoked by name all registered functions will be called sequentially in their order of addition.
|
||||
|
||||
Note that the ''value'' passed to the subsequent hook function will be the return value of the previous hook function.
|
||||
|
||||
Though not essential care should be taken to ensure that hooks are added before they are invoked. For example: [[Hook: th-opening-default-tiddlers-list]] should ideally be added before the story startup module is invoked otherwise any hook specified additions to the default tiddlers will not be seen on the initial loading of the page, though will be visible if the user clicks the home button.
|
||||
Be careful not to `addHook` in widget's `render` method, which will be call several times. You could `addHook` in methods that only called once, e.g. the constructor of widget class. Otherwise you should `removeHook` then add it again.
|
||||
|
||||
!!! Timing of registration
|
||||
|
||||
Though not essential care should be taken to ensure that hooks are added before they are invoked.
|
||||
|
||||
For example: [[Hook: th-opening-default-tiddlers-list]] should ideally be added before the story startup module is invoked. Otherwise any hook specified additions to the default tiddlers will not be seen on the initial loading of the page, though will be visible if the user clicks the home button.
|
||||
|
||||
!! Remove a hook
|
||||
|
||||
You should clean up the callback when your widget is going to unmount.
|
||||
|
||||
```js
|
||||
$tw.hooks.removeHook(handler)
|
||||
```
|
||||
|
||||
The `handler` should be the same function instance you used in `addHook` (check by `===`). You can save it to `this.xxxHookHandler` on your widget, and call `removeHook` in [[destroy method|Widget `destroy` method examples]].
|
||||
|
||||
!! Example
|
||||
|
||||
|
||||
@@ -12,6 +12,9 @@
|
||||
"empty": [
|
||||
"--render","$:/core/save/all","empty.html","text/plain",
|
||||
"--render","$:/core/save/all","empty.hta","text/plain"],
|
||||
"emptyexternalcore": [
|
||||
"--render","$:/core/save/offline-external-js","empty-external-core.html","text/plain",
|
||||
"--render","$:/core/templates/tiddlywiki5.js","[[tiddlywikicore-]addsuffix<version>addsuffix[.js]]","text/plain"],
|
||||
"externalimages": [
|
||||
"--savetiddlers","[is[image]]","images",
|
||||
"--setfield","[is[image]]","_canonical_uri","$:/core/templates/canonical-uri-external-image","text/plain",
|
||||
@@ -20,7 +23,7 @@
|
||||
"static": [
|
||||
"--render","$:/core/templates/static.template.html","static.html","text/plain",
|
||||
"--render","$:/core/templates/alltiddlers.template.html","alltiddlers.html","text/plain",
|
||||
"--render","[!is[system]]","[encodeuricomponent[]addprefix[static/]addsuffix[.html]]","text/plain",
|
||||
"--render","[!is[system]]","[encodeuricomponent[]addprefix[static/]addsuffix[.html]]","text/plain","$:/core/templates/static.tiddler.html",
|
||||
"--render","$:/core/templates/static.template.css","static/static.css","text/plain"]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
"static": [
|
||||
"--render","$:/core/templates/static.template.html","static.html","text/plain",
|
||||
"--render","$:/core/templates/alltiddlers.template.html","alltiddlers.html","text/plain",
|
||||
"--render","[!is[system]]","[encodeuricomponent[]addprefix[static/]addsuffix[.html]]","text/plain",
|
||||
"--render","[!is[system]]","[encodeuricomponent[]addprefix[static/]addsuffix[.html]]","text/plain","$:/core/templates/static.tiddler.html",
|
||||
"--render","$:/core/templates/static.template.css","static/static.css","text/plain"]
|
||||
}
|
||||
}
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
"static": [
|
||||
"--render","$:/core/templates/static.template.html","static.html","text/plain",
|
||||
"--render","$:/core/templates/alltiddlers.template.html","alltiddlers.html","text/plain",
|
||||
"--render","[!is[system]]","[encodeuricomponent[]addprefix[static/]addsuffix[.html]]","text/plain",
|
||||
"--render","[!is[system]]","[encodeuricomponent[]addprefix[static/]addsuffix[.html]]","text/plain","$:/core/templates/static.tiddler.html",
|
||||
"--render","$:/core/templates/static.template.css","static/static.css","text/plain"]
|
||||
}
|
||||
}
|
||||
|
||||
@@ -17,8 +17,8 @@
|
||||
],
|
||||
"library": [
|
||||
"--makelibrary","$:/UpgradeLibrary",
|
||||
"--savelibrarytiddlers","$:/UpgradeLibrary","[prefix[$:/]] -[[$:/plugins/tiddlywiki/upgrade]] -[[$:/plugins/tiddlywiki/translators]] -[[$:/plugins/tiddlywiki/pluginlibrary]] -[[$:/plugins/tiddlywiki/jasmine]]","recipes/library/tiddlers/","$:/UpgradeLibrary/List",
|
||||
"--savetiddler","$:/UpgradeLibrary/List","recipes/library/tiddlers.json",
|
||||
"--savelibrarytiddlers","$:/UpgradeLibrary","[prefix[$:/]] -[[$:/plugins/tiddlywiki/upgrade]] -[[$:/plugins/tiddlywiki/translators]] -[[$:/plugins/tiddlywiki/pluginlibrary]] -[[$:/plugins/tiddlywiki/jasmine]]","recipes/library/tiddlers/","$:/UpgradeLibrary/List",
|
||||
"--savetiddler","$:/UpgradeLibrary/List","recipes/library/tiddlers.json",
|
||||
"--rendertiddler","$:/plugins/tiddlywiki/pluginlibrary/library.template.html","index.html","text/plain"]
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
title: $:/config/LocalPluginLibrary
|
||||
tags: $:/tags/PluginLibrary
|
||||
url: http://127.0.0.1:8080/prerelease/library/v5.3.1/index.html
|
||||
url: http://127.0.0.1:8080/prerelease/library/v5.3.2/index.html
|
||||
caption: {{$:/language/OfficialPluginLibrary}} (Prerelease Local)
|
||||
|
||||
A locally installed version of the official ~TiddlyWiki plugin library at tiddlywiki.com for testing and debugging. //Requires a local web server to share the library//
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
title: $:/config/OfficialPluginLibrary
|
||||
tags: $:/tags/PluginLibrary
|
||||
url: https://tiddlywiki.com/prerelease/library/v5.3.1/index.html
|
||||
url: https://tiddlywiki.com/prerelease/library/v5.3.2/index.html
|
||||
caption: {{$:/language/OfficialPluginLibrary}} (Prerelease)
|
||||
|
||||
The prerelease version of the official ~TiddlyWiki plugin library at tiddlywiki.com. Plugins, themes and language packs are maintained by the core team.
|
||||
|
||||
@@ -20,4 +20,4 @@
|
||||
"favicon": [
|
||||
"--savetiddler","$:/favicon.ico","favicon.ico"]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
"static": [
|
||||
"--render","$:/core/templates/static.template.html","static.html","text/plain",
|
||||
"--render","$:/core/templates/alltiddlers.template.html","alltiddlers.html","text/plain",
|
||||
"--render","[!is[system]]","[encodeuricomponent[]addprefix[static/]addsuffix[.html]]","text/plain",
|
||||
"--render","[!is[system]]","[encodeuricomponent[]addprefix[static/]addsuffix[.html]]","text/plain","$:/core/templates/static.tiddler.html",
|
||||
"--render","$:/core/templates/static.template.css","static/static.css","text/plain"],
|
||||
"tiddlywikicore": [
|
||||
"--render","$:/core/templates/tiddlywiki5.js","[[tiddlywikicore-]addsuffix<version>addsuffix[.js]]","text/plain"]
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
"static": [
|
||||
"--render","$:/core/templates/static.template.html","static.html","text/plain",
|
||||
"--render","$:/core/templates/alltiddlers.template.html","alltiddlers.html","text/plain",
|
||||
"--render","[!is[system]]","[encodeuricomponent[]addprefix[static/]addsuffix[.html]]","text/plain",
|
||||
"--render","[!is[system]]","[encodeuricomponent[]addprefix[static/]addsuffix[.html]]","text/plain","$:/core/templates/static.tiddler.html",
|
||||
"--render","$:/core/templates/static.template.css","static/static.css","text/plain"]
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
title: Widgets/DataAttributes/ButtonWidget
|
||||
description: Data Attributes for ButtonWidget
|
||||
type: text/vnd.tiddlywiki-multiple
|
||||
tags: [[$:/tags/wiki-test-spec]]
|
||||
|
||||
title: Output
|
||||
|
||||
\whitespace trim
|
||||
<$button tag="div" class="myclass" data-title="mytiddler" style.color="red" onclick="clicked">
|
||||
my tiddler
|
||||
</$button>
|
||||
<$button tag="div" class="myclass" data-title={{Temp}} style.color={{{ [[Temp]get[color]] }}}>
|
||||
hello
|
||||
</$button>
|
||||
+
|
||||
title: Actions
|
||||
|
||||
<$action-setfield $tiddler="Temp" $field="text" $value="Title2" color="red"/>
|
||||
+
|
||||
title: Temp
|
||||
color: black
|
||||
|
||||
Title1
|
||||
+
|
||||
title: ExpectedResult
|
||||
|
||||
<p><div class="myclass" data-title="mytiddler" style="color:red;">my tiddler</div><div class="myclass" data-title="Title2" style="color:red;">hello</div></p>
|
||||
@@ -0,0 +1,22 @@
|
||||
title: Widgets/DataAttributes/CheckboxWidget
|
||||
description: Data Attributes for CheckboxWidget
|
||||
type: text/vnd.tiddlywiki-multiple
|
||||
tags: [[$:/tags/wiki-test-spec]]
|
||||
|
||||
title: Output
|
||||
|
||||
\whitespace trim
|
||||
<$checkbox tag="done" data-title={{Temp}} style.color={{{ [[Temp]get[color]] }}} onclick="clicked"> Is it done?</$checkbox>
|
||||
+
|
||||
title: Actions
|
||||
|
||||
<$action-setfield $tiddler="Temp" $field="text" $value="Title2" color="red"/>
|
||||
+
|
||||
title: Temp
|
||||
color: black
|
||||
|
||||
Title1
|
||||
+
|
||||
title: ExpectedResult
|
||||
|
||||
<p><label class="tc-checkbox "><input data-title="Title2" type="checkbox" style="color:red;"><span>Is it done?</span></label></p>
|
||||
@@ -0,0 +1,27 @@
|
||||
title: Widgets/DataAttributes/DraggableWidget
|
||||
description: Data Attributes for DraggableWidget
|
||||
type: text/vnd.tiddlywiki-multiple
|
||||
tags: [[$:/tags/wiki-test-spec]]
|
||||
|
||||
title: Output
|
||||
|
||||
\whitespace trim
|
||||
<$draggable tag="div" class="myclass" data-title="mytiddler" style.color="red" onclick="clicked">
|
||||
my tiddler
|
||||
</$draggable>
|
||||
<$draggable tag="div" class="myclass" data-title={{Temp}} style.color={{{ [[Temp]get[color]] }}}>
|
||||
hello
|
||||
</$draggable>
|
||||
+
|
||||
title: Actions
|
||||
|
||||
<$action-setfield $tiddler="Temp" $field="text" $value="Title2" color="red"/>
|
||||
+
|
||||
title: Temp
|
||||
color: black
|
||||
|
||||
Title1
|
||||
+
|
||||
title: ExpectedResult
|
||||
|
||||
<p><div class="myclass tc-draggable" data-title="mytiddler" draggable="true" style="color:red;">my tiddler</div><div class="myclass tc-draggable" data-title="Title2" draggable="true" style="color:red;">hello</div></p>
|
||||
@@ -0,0 +1,27 @@
|
||||
title: Widgets/DataAttributes/DroppableWidget
|
||||
description: Data Attributes for DroppableWidget
|
||||
type: text/vnd.tiddlywiki-multiple
|
||||
tags: [[$:/tags/wiki-test-spec]]
|
||||
|
||||
title: Output
|
||||
|
||||
\whitespace trim
|
||||
<$droppable tag="div" class="myclass" data-title="mytiddler" style.color="red" onclick="clicked">
|
||||
my tiddler
|
||||
</$droppable>
|
||||
<$droppable tag="div" class="myclass" data-title={{Temp}} style.color={{{ [[Temp]get[color]] }}}>
|
||||
hello
|
||||
</$droppable>
|
||||
+
|
||||
title: Actions
|
||||
|
||||
<$action-setfield $tiddler="Temp" $field="text" $value="Title2" color="red"/>
|
||||
+
|
||||
title: Temp
|
||||
color: black
|
||||
|
||||
Title1
|
||||
+
|
||||
title: ExpectedResult
|
||||
|
||||
<p><div class="myclass tc-droppable" data-title="mytiddler" style="color:red;">my tiddler</div><div class="myclass tc-droppable" data-title="Title2" style="color:red;">hello</div></p>
|
||||
@@ -0,0 +1,27 @@
|
||||
title: Widgets/DataAttributes/LinkWidget
|
||||
description: Data Attributes for LinkWidget
|
||||
type: text/vnd.tiddlywiki-multiple
|
||||
tags: [[$:/tags/wiki-test-spec]]
|
||||
|
||||
title: Output
|
||||
|
||||
\whitespace trim
|
||||
<$link data-id="mytiddler" style.color="red" to="Temp" onclick="clicked">
|
||||
link to Temp
|
||||
</$link>
|
||||
<$link tag="button" data-id={{Temp}} style.color={{{ [[Temp]get[color]] }}} to="SomeTiddler">
|
||||
some tiddler
|
||||
</$link>
|
||||
+
|
||||
title: Actions
|
||||
|
||||
<$action-setfield $tiddler="Temp" $field="text" $value="Title2" color="red"/>
|
||||
+
|
||||
title: Temp
|
||||
color: black
|
||||
|
||||
Title1
|
||||
+
|
||||
title: ExpectedResult
|
||||
|
||||
<p><a class="tc-tiddlylink tc-tiddlylink-resolves" data-id="mytiddler" href="#Temp" style="color:red;">link to Temp</a><button class="tc-tiddlylink tc-tiddlylink-missing" data-id="Title2" draggable="true" style="color:red;">some tiddler</button></p>
|
||||
@@ -0,0 +1,15 @@
|
||||
title: Widgets/DataAttributes/OrderedStyleAttributes
|
||||
description: Ordered style attributes
|
||||
type: text/vnd.tiddlywiki-multiple
|
||||
tags: [[$:/tags/wiki-test-spec]]
|
||||
|
||||
title: Output
|
||||
|
||||
\whitespace trim
|
||||
<div style="background:red;color:blue;" style.background="green">
|
||||
hello
|
||||
</div>
|
||||
+
|
||||
title: ExpectedResult
|
||||
|
||||
<p><div style="background:green;color:blue;">hello</div></p>
|
||||
@@ -0,0 +1,27 @@
|
||||
title: Widgets/DataAttributes/SelectWidget
|
||||
description: Data Attributes for SelectWidget
|
||||
type: text/vnd.tiddlywiki-multiple
|
||||
tags: [[$:/tags/wiki-test-spec]]
|
||||
|
||||
title: Output
|
||||
|
||||
\whitespace trim
|
||||
<$select tiddler='New Tiddler' field='text' default='Choose a new text' data-title={{Temp}} style.color={{{ [[Temp]get[color]] }}} onclick="clicked">
|
||||
<option disabled>Choose a new text</option>
|
||||
<option>A Tale of Two Cities</option>
|
||||
<option>A New Kind of Science</option>
|
||||
<option>The Dice Man</option>
|
||||
</$select>
|
||||
+
|
||||
title: Actions
|
||||
|
||||
<$action-setfield $tiddler="Temp" $field="text" $value="Title2" color="red"/>
|
||||
+
|
||||
title: Temp
|
||||
color: black
|
||||
|
||||
Title1
|
||||
+
|
||||
title: ExpectedResult
|
||||
|
||||
<p><select data-title="Title2" value="Choose a new text" style="color:red;"><option disabled="true">Choose a new text</option><option>A Tale of Two Cities</option><option>A New Kind of Science</option><option>The Dice Man</option></select></p>
|
||||
@@ -0,0 +1,15 @@
|
||||
title: Widgets/ElementWidgetEventAttributes
|
||||
description: Element widget should not support event attributes starting with "on"
|
||||
type: text/vnd.tiddlywiki-multiple
|
||||
tags: [[$:/tags/wiki-test-spec]]
|
||||
|
||||
title: Output
|
||||
|
||||
\whitespace trim
|
||||
<div class="hello" onclick="clicked">
|
||||
TiddlyWiki
|
||||
</div>
|
||||
+
|
||||
title: ExpectedResult
|
||||
|
||||
<p><div class="hello">TiddlyWiki</div></p>
|
||||
@@ -0,0 +1,15 @@
|
||||
title: Widgets/ElementWidgetStyleAttributes
|
||||
description: Element widget should support style.* attributes
|
||||
type: text/vnd.tiddlywiki-multiple
|
||||
tags: [[$:/tags/wiki-test-spec]]
|
||||
|
||||
title: Output
|
||||
|
||||
\whitespace trim
|
||||
<div class="hello" onclick="clicked" style.color="blue" style.color="red" style.background="yellow">
|
||||
TiddlyWiki
|
||||
</div>
|
||||
+
|
||||
title: ExpectedResult
|
||||
|
||||
<p><div class="hello" style="color:red;background:yellow;">TiddlyWiki</div></p>
|
||||
@@ -527,6 +527,29 @@ describe("Widget module", function() {
|
||||
expect(wrapper.children[0].children[15].sequenceNumber).toBe(53);
|
||||
});
|
||||
|
||||
var testCounterLast = function(oldList, newList) {
|
||||
return function() {
|
||||
var wiki = new $tw.Wiki();
|
||||
// Add some tiddlers
|
||||
wiki.addTiddler({title: "Numbers", text: "", list: oldList});
|
||||
var text = "<$list filter='[list[Numbers]]' variable='item' counter='c'><<item>><$text text={{{ [<c-last>match[no]then[, ]] }}} /></$list>";
|
||||
var widgetNode = createWidgetNode(parseText(text,wiki),wiki);
|
||||
// Render the widget node to the DOM
|
||||
var wrapper = renderWidgetNode(widgetNode);
|
||||
// Test the rendering
|
||||
expect(wrapper.innerHTML).toBe("<p>" + oldList.split(' ').join(', ') + "</p>");
|
||||
// Append a number
|
||||
wiki.addTiddler({title: "Numbers", text: "", list: newList});
|
||||
refreshWidgetNode(widgetNode,wrapper,["Numbers"]);
|
||||
expect(wrapper.innerHTML).toBe("<p>" + newList.split(' ').join(', ') + "</p>");
|
||||
}
|
||||
}
|
||||
|
||||
it("the list widget with counter-last should update correctly when list is appended", testCounterLast("1 2 3 4", "1 2 3 4 5"));
|
||||
it("the list widget with counter-last should update correctly when last item is removed", testCounterLast("1 2 3 4", "1 2 3"));
|
||||
it("the list widget with counter-last should update correctly when first item is inserted", testCounterLast("1 2 3 4", "0 1 2 3 4"));
|
||||
it("the list widget with counter-last should update correctly when first item is removed", testCounterLast("1 2 3 4", "2 3 4"));
|
||||
|
||||
it("should deal with the list widget followed by other widgets", function() {
|
||||
var wiki = new $tw.Wiki();
|
||||
// Add some tiddlers
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
"static": [
|
||||
"--render","$:/core/templates/static.template.html","static.html","text/plain",
|
||||
"--render","$:/core/templates/alltiddlers.template.html","alltiddlers.html","text/plain",
|
||||
"--render","[!is[system]]","[encodeuricomponent[]addprefix[static/]addsuffix[.html]]","text/plain","$:/core/templates/static.tiddler.html",
|
||||
"--render","[!is[system]]","[encodeuricomponent[]addprefix[static/]addsuffix[.html]]","text/plain","$:/core/templates/static.tiddler.html",
|
||||
"--render","$:/core/templates/static.template.css","static/static.css","text/plain"]
|
||||
},
|
||||
"config": {
|
||||
|
||||
@@ -13,6 +13,8 @@ url: https://ibnishak.github.io/Timimi/
|
||||
|
||||
Timimi is a web-extension accompanied by a native host that allows you to save and backup your standalone HTML tiddlywiki files ''anywhere in your hard-drive''. Once installed, you can save the tiddlywiki files without any extra steps, like the original Tiddlyfox addon.
|
||||
|
||||
* The native host requires a component installed on the host computer, outside the browser.
|
||||
|
||||
{{!!url}}
|
||||
|
||||
As of version 2.1, Timimi supports the following browsers
|
||||
@@ -29,4 +31,4 @@ Timimi also provides users with 4 backup strategies, viz:
|
||||
* Create a backup Every n^^th^^ save
|
||||
* Create a backup every n^^th^^ minute
|
||||
* Customised Tower of Hanoi
|
||||
* First in First Out
|
||||
* First in First Out
|
||||
|
||||
@@ -1,16 +0,0 @@
|
||||
created: 20140312085406905
|
||||
modified: 20140312084543862
|
||||
tags: Tutorials
|
||||
title: "Install and run TiddlyWiki on a CentOS 6 VPS using Nginx" from RoseHosting
|
||||
type: text/vnd.tiddlywiki
|
||||
url: http://www.rosehosting.com/blog/install-and-run-tiddlywiki-on-a-centoos-6-vps-using-nginx/
|
||||
|
||||
A step by step guide to running TiddlyWiki on a ~CentOS Virtual Private Server.
|
||||
|
||||
{{!!url}}
|
||||
|
||||
<<<
|
||||
In this tutorial we will guide you through the steps of installing and running TiddlyWiki on a ~CentOS 6 VPS.
|
||||
|
||||
We will also install and configure Nginx as a reverse proxy, so you can run TiddlyWiki behind Nginx.
|
||||
<<<
|
||||
@@ -1,9 +0,0 @@
|
||||
created: 20171029155046637
|
||||
modified: 20171029155227382
|
||||
tags: [[Operator Examples]] [[stringify Operator]]
|
||||
title: jsonstringify Operator (Examples)
|
||||
type: text/vnd.tiddlywiki
|
||||
|
||||
<<.operator-example 1 """[[Title with "double quotes" and single ' and \backslash]] +[jsonstringify[]]""">>
|
||||
<<.operator-example 2 """[[Accents and emojis -> äñøßπ ⌛🎄🍪🍓 without suffix]] +[jsonstringify[]]""">>
|
||||
<<.operator-example 3 """[[Accents and emojis -> äñøßπ ⌛🎄🍪🍓 with rawunicode suffix]] +[jsonstringify:rawunicode[]]""">>
|
||||
@@ -1,9 +1,9 @@
|
||||
created: 20161017154944352
|
||||
modified: 20171029155233487
|
||||
modified: 20230919124059118
|
||||
tags: [[Operator Examples]] [[stringify Operator]]
|
||||
title: stringify Operator (Examples)
|
||||
type: text/vnd.tiddlywiki
|
||||
|
||||
<<.operator-example 1 """[[Title with "double quotes" and single ' and \backslash]] +[stringify[]]""">>
|
||||
<<.operator-example 2 """[[Accents and emojis -> äñøßπ ⌛🎄🍪🍓 without suffix]] +[stringify[]]""">>
|
||||
<<.operator-example 3 """[[Accents and emojis -> äñøßπ ⌛🎄🍪🍓 with rawunicode suffix]] +[stringify:rawunicode[]]""">>
|
||||
<<.operator-example 3 """[[Accents and emojis -> äñøßπ ⌛🎄🍪🍓 with rawunicode suffix]] +[stringify:rawunicode[]]""">>
|
||||
@@ -1,36 +1,12 @@
|
||||
caption: jsonstringify
|
||||
created: 20171029155051467
|
||||
from-version: 5.1.14
|
||||
modified: 20171029155143797
|
||||
op-input: a [[selection of titles|Title Selection]]
|
||||
op-output: the input with JSON string encodings applied
|
||||
modified: 20230919124826880
|
||||
op-parameter:
|
||||
op-parameter-name:
|
||||
op-purpose: apply JSON string encoding to a string
|
||||
op-suffix: <<.from-version "5.1.23">> optionally, the keyword `rawunicode`
|
||||
op-purpose: deprecated, use <<.olink stringify>> instead
|
||||
op-suffix-name: R
|
||||
tags: [[Filter Operators]] [[String Operators]]
|
||||
title: jsonstringify Operator
|
||||
type: text/vnd.tiddlywiki
|
||||
|
||||
The following substitutions are made:
|
||||
|
||||
|!Character |!Replacement |!Condition |
|
||||
|`\` |`\\` |Always |
|
||||
|`"` |`\"` |Always |
|
||||
|Carriage return (0x0d) |`\\r` |Always |
|
||||
|Line feed (0x0a) |`\\n` |Always |
|
||||
|Backspace (0x08) |`\\b` |Always |
|
||||
|Form field (0x0c) |`\\f` |Always |
|
||||
|Tab (0x09) |`\\t` |Always |
|
||||
|Characters from 0x00 to 0x1f |`\\u####` where #### is four hex digits |Always |
|
||||
|Characters from 0x80 to 0xffff|`\\u####` where #### is four hex digits |If `rawunicode` suffix is not present (default) |
|
||||
|Characters from 0x80 to 0xffff|Unchanged |If `rawunicode` suffix is present <<.from-version "5.1.23">> |
|
||||
|
||||
<<.from-version "5.1.23">> If the suffix `rawunicode` is present, Unicode characters above 0x80 (such as ß, ä, ñ or 🎄) will be passed through unchanged. Without the suffix, they will be substituted with `\\u` codes, which was the default behavior before 5.1.23.
|
||||
|
||||
<<.note """Technical note: Characters outside the Basic Multilingual Plane, such as 🎄 and other emojis, will be encoded as a UTF-16 surrogate pair, i.e. with two `\u` sequences.""">>
|
||||
|
||||
Also see the [[stringify Operator]].
|
||||
|
||||
<<.operator-examples "jsonstringify">>
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
caption: stringify
|
||||
created: 20161017153038029
|
||||
modified: 20171029155143797
|
||||
from-version: 5.1.14
|
||||
modified: 20230919130847809
|
||||
op-input: a [[selection of titles|Title Selection]]
|
||||
op-output: the input with ~JavaScript string encodings applied
|
||||
op-parameter:
|
||||
@@ -11,26 +12,25 @@ op-suffix-name: R
|
||||
tags: [[Filter Operators]] [[String Operators]]
|
||||
title: stringify Operator
|
||||
type: text/vnd.tiddlywiki
|
||||
from-version: 5.1.14
|
||||
|
||||
The following substitutions are made:
|
||||
|
||||
|!Character |!Replacement |!Condition |
|
||||
|`\` |`\\` |Always |
|
||||
|`"` |`\"` |Always |
|
||||
|Carriage return (0x0d) |`\\r` |Always |
|
||||
|Line feed (0x0a) |`\\n` |Always |
|
||||
|Backspace (0x08) |`\\b` |Always |
|
||||
|Form field (0x0c) |`\\f` |Always |
|
||||
|Tab (0x09) |`\\t` |Always |
|
||||
|Characters from 0x00 to 0x1f |`\\x##` where ## is two hex digits |Always |
|
||||
|Characters from 0x80 to 0xffff|`\\u####` where #### is four hex digits |If `rawunicode` suffix is not present (default) |
|
||||
|Carriage return (0x0d) |`\r` |Always |
|
||||
|Line feed (0x0a) |`\n` |Always |
|
||||
|Backspace (0x08) |`\b` |Always |
|
||||
|Form field (0x0c) |`\f` |Always |
|
||||
|Tab (0x09) |`\t` |Always |
|
||||
|Characters from 0x00 to 0x1f |`\x##` where ## is two hex digits |Always |
|
||||
|Characters from 0x80 to 0xffff|`\u####` where #### is four hex digits |If `rawunicode` suffix is not present (default) |
|
||||
|Characters from 0x80 to 0xffff|<<.from-version "5.1.23">> Unchanged |If `rawunicode` suffix is present |
|
||||
|
||||
<<.from-version "5.1.23">> If the suffix `rawunicode` is present, Unicode characters above 0x80 (such as ß, ä, ñ or 🎄) will be passed through unchanged. Without the suffix, they will be substituted with `\\u` codes, which was the default behavior before 5.1.23.
|
||||
<<.from-version "5.1.23">> If the suffix `rawunicode` is present, Unicode characters above 0x80 (such as ß, ä, ñ or 🎄) will be passed through unchanged. Without the suffix, they will be substituted with `\u` codes, which was the default behavior before 5.1.23.
|
||||
|
||||
<<.note """Technical note: Characters outside the Basic Multilingual Plane, such as 🎄 and other emojis, will be encoded as a UTF-16 surrogate pair, i.e. with two `\u` sequences.""">>
|
||||
<<.note """Characters outside the Basic Multilingual Plane, such as 🎄 and other emojis, will be encoded as a UTF-16 surrogate pair, i.e. with two `\u` sequences.""">>
|
||||
|
||||
Also see the [[jsonstringify Operator]].
|
||||
<<.olink jsonstringify>> is considered deprecated, as it duplicates the functionality of <<.op stringify>>.
|
||||
|
||||
<<.operator-examples "stringify">>
|
||||
<<.operator-examples "stringify">>
|
||||
@@ -1,7 +1,7 @@
|
||||
title: Constructing JSON tiddlers
|
||||
tags: [[JSON in TiddlyWiki]] [[Learning]]
|
||||
created: 20220427174702859
|
||||
modified: 20220427174702859
|
||||
modified: 20230809113620964
|
||||
tags: [[JSON in TiddlyWiki]] Learning
|
||||
title: Constructing JSON tiddlers
|
||||
|
||||
See [[JSON in TiddlyWiki]] for an overview of using JSON in TiddlyWiki.
|
||||
|
||||
@@ -13,4 +13,4 @@ At a high level, we have several ways to generate JSON data in TiddlyWiki's own
|
||||
* [[jsontiddler Macro]]
|
||||
* [[jsontiddlers Macro]]
|
||||
|
||||
When constructing JSON data manually, the [[jsonstringify Operator]] is needed to ensure that any special characters are properly escaped.
|
||||
When constructing JSON data manually, the [[stringify Operator]] is needed to ensure that any special characters are properly escaped.
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 42 KiB After Width: | Height: | Size: 102 KiB |
@@ -5,7 +5,7 @@ title: WidgetMessage: tm-permalink
|
||||
type: text/vnd.tiddlywiki
|
||||
caption: tm-permalink
|
||||
|
||||
The `tm-permalink` message changes the browser address bar to form a [[permalink|PermaLinks]] to a specified tiddler, defaulting to the current tiddler.
|
||||
The `tm-permalink` message changes the browser address bar to form a [[permalink|PermaLinks]] to a specified tiddler, defaulting to the current tiddler. The resulting link will be copied to the clipboard.
|
||||
|
||||
The permalink message supports the following properties on the `event` object:
|
||||
|
||||
|
||||
@@ -1,13 +1,17 @@
|
||||
created: 20220917113002350
|
||||
modified: 20230419103154329
|
||||
modified: 20230921180332436
|
||||
tags: Pragmas
|
||||
title: Pragma: \whitespace
|
||||
type: text/vnd.tiddlywiki
|
||||
|
||||
<<.from-version "5.1.15">> The ''\whitespace'' [[pragma|Pragmas]] determines how spaces and newlines are treated within wikitext. Note that this only applies to the printable text, and not to other text, such as the values of attributes.
|
||||
<<.from-version "5.1.15">> The ''\whitespace'' [[pragma|Pragmas]] determines how spaces and newlines are treated within wikitext.
|
||||
|
||||
* ''notrim'' -- whitespace text is not subject to special processing (the default)
|
||||
* ''trim'' -- whitespace text is removed
|
||||
* ''trim'' -- whitespace text is ignored
|
||||
|
||||
Note that the processing only applies to the printable text, and not to other text, such as the values of attributes.
|
||||
|
||||
The whitespace setting only applies to the parsed content in which it appears. The setting is inherited by embedded [[Procedure Definitions]] and [[Custom Widgets]] definitions, but is not inherited by [[Macro definitions]].
|
||||
|
||||
```
|
||||
\whitespace trim|notrim
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
created: 20221007125701001
|
||||
modified: 20230419103154329
|
||||
modified: 20230921180332436
|
||||
tags: WikiText Procedures
|
||||
title: Procedure Definitions
|
||||
type: text/vnd.tiddlywiki
|
||||
@@ -18,6 +18,8 @@ This is the procedure text (param=<<param>>)
|
||||
\end
|
||||
```
|
||||
|
||||
Note that the [[Pragma: \whitespace]] setting is inherited from the parsing context in which the procedure definition occurs. That means that a tiddler containing multiple procedure definitions only needs a single whitespace pragma at the top of the tiddler, and the setting will be automatically inherited by the procedure definitions without needing the pragma to be repeated.
|
||||
|
||||
!! Procedure Definition with Set Widget
|
||||
|
||||
Procedures are implemented as a special kind of [[variable|Variables]] and so internally are actually defined with a <<.wlink SetWidget>> widget.
|
||||
|
||||
@@ -8,9 +8,15 @@ type: text/vnd.tiddlywiki
|
||||
|
||||
//[[See GitHub for detailed change history of this release|https://github.com/Jermolene/TiddlyWiki5/compare/v5.3.0...v5.3.1]]//
|
||||
|
||||
<<.banner-credits
|
||||
credit:"""Congratulations to [[vilc|https://talk.tiddlywiki.org/u/vilc]] for their winning design for the banner for this release (here is the [[competition thread|https://talk.tiddlywiki.org/t/banner-image-competition-for-v5-3-0/7406/10]]).
|
||||
"""
|
||||
url:"https://github.com/Jermolene/TiddlyWiki5/blob/4124bbdfb3e2445d45488006dfff1925d067ab0f/editions/tw5.com/tiddlers/images/New%20Release%20Banner.png?raw=true"
|
||||
>>
|
||||
|
||||
! Overview of v5.3.1
|
||||
|
||||
This release comes only a month after [[v5.3.0|Release 5.3.0]]. The motivation for the release is to swiftly fix some issues that have emerged with v5.3.0. There are also some other improvements included in this release, notably the ability to access binary resources over HTTP -- the [[demo|WidgetMessage: tm-http-request Example - Random Dog]] downloads a random image or video of a dog.
|
||||
This release comes only a few weeks after [[v5.3.0|Release 5.3.0]]. The motivation for the release is to swiftly fix some issues that have emerged with v5.3.0. There are also some other improvements included in this release, notably the ability to access binary resources over HTTP -- the [[demo|WidgetMessage: tm-http-request Example - Random Dog]] downloads a random image or video of a dog.
|
||||
|
||||
! Bug Fixes and Reversions of v5.3.0 Changes
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
caption: browse
|
||||
created: 20131024141900000
|
||||
modified: 20200421221304177
|
||||
modified: 20231113093304323
|
||||
tags: Widgets
|
||||
title: BrowseWidget
|
||||
type: text/vnd.tiddlywiki
|
||||
@@ -20,6 +20,8 @@ The content of the <<.wid BrowseWidget>> widget is ignored.
|
||||
|accept |<<.from-version "5.1.23">> Optional comma delimited [[list of file accepted extensions|https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/file#Unique_file_type_specifiers]] and/or MIME types |
|
||||
|message |Optional override of widget message to be generated. The files will be passed in the JavaScript object `event.target.files` |
|
||||
|param |Optional parameter to be passed with the custom message |
|
||||
|data-* |<<.from-version "5.3.2">> Optional [[data attributes|https://developer.mozilla.org/en-US/docs/Learn/HTML/Howto/Use_data_attributes]] to be assigned to the HTML element |
|
||||
|style.* |<<.from-version "5.3.2">> Optional [[CSS properties|https://developer.mozilla.org/en-US/docs/Web/CSS/Reference]] to be assigned to the HTML element |
|
||||
|
||||
On iPhone/iPad choosing the multiple option will remove the ability to take photographs/videos directly into TiddlyWiki.
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
caption: button
|
||||
created: 20131024141900000
|
||||
modified: 20220810192251345
|
||||
modified: 20231113093304323
|
||||
tags: Widgets TriggeringWidgets
|
||||
title: ButtonWidget
|
||||
type: text/vnd.tiddlywiki
|
||||
@@ -41,6 +41,8 @@ The content of the `<$button>` widget is displayed within the button.
|
||||
|aria-label |Optional [[Accessibility]] label |
|
||||
|tooltip |Optional tooltip |
|
||||
|class |An optional CSS class name to be assigned to the HTML element|
|
||||
|data-* |<<.from-version "5.3.2">> Optional [[data attributes|https://developer.mozilla.org/en-US/docs/Learn/HTML/Howto/Use_data_attributes]] to be assigned to the HTML element |
|
||||
|style.* |<<.from-version "5.3.2">> Optional [[CSS properties|https://developer.mozilla.org/en-US/docs/Web/CSS/Reference]] to be assigned to the HTML element |
|
||||
|style |An optional CSS style attribute to be assigned to the HTML element |
|
||||
|tag |An optional html tag to use instead of the default "button" |
|
||||
|dragTiddler |An optional tiddler title making the button draggable and identifying the payload tiddler. See DraggableWidget for details |
|
||||
|
||||
@@ -3,7 +3,7 @@ colors: red orange yellow blue
|
||||
created: 20131024141900000
|
||||
fruits: bananas oranges grapes
|
||||
list: [[CheckboxWidget (tag Mode)]] [[CheckboxWidget (field Mode)]] [[CheckboxWidget (listField Mode)]] [[CheckboxWidget (index Mode)]] [[CheckboxWidget (listIndex Mode)]] [[CheckboxWidget (filter Mode)]] [[CheckboxWidget (indeterminate)]]
|
||||
modified: 20230316192632667
|
||||
modified: 20231113093304323
|
||||
tags: Widgets TriggeringWidgets
|
||||
title: CheckboxWidget
|
||||
type: text/vnd.tiddlywiki
|
||||
@@ -38,5 +38,7 @@ The content of the `<$checkbox>` widget is displayed within an HTML `<label>` el
|
||||
|<<.attr uncheckactions>> |<<.from-version "5.1.16">> A string containing ActionWidgets to be triggered when the checkbox is unchecked |
|
||||
|<<.attr checkactions>> |<<.from-version "5.1.20">> A string containing ActionWidgets to be triggered when the checkbox is checked |
|
||||
|<<.attr disabled>> |<<.from-version "5.1.23">> Optionally disables the checkbox if set to <<.value yes>> (defaults to <<.value no>>)|
|
||||
|<<.attr data-*>> |<<.from-version "5.3.2">> Optional [[data attributes|https://developer.mozilla.org/en-US/docs/Learn/HTML/Howto/Use_data_attributes]] to be assigned to the HTML `<input>` element |
|
||||
|<<.attr style.*>> |<<.from-version "5.3.2">> Optional [[CSS properties|https://developer.mozilla.org/en-US/docs/Web/CSS/Reference]] to be assigned to the HTML `<input>` element |
|
||||
|
||||
<<.doc-tabs>>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
created: 20221007144237585
|
||||
modified: 20230419103154328
|
||||
modified: 20230921180332436
|
||||
tags: Concepts Reference
|
||||
title: Custom Widgets
|
||||
type: text/vnd.tiddlywiki
|
||||
@@ -22,6 +22,8 @@ This is the widget, and the attribute is <<attribute>>.
|
||||
|
||||
The name of the widget must start with a dollar sign. If it is a user defined widget that does not override an existing widget then it must include at least one period (dot) within the name (for example `$my.widget` or `$acme.logger`).
|
||||
|
||||
Note that the [[Pragma: \whitespace]] setting is inherited from the parsing context in which the procedure definition occurs. That means that a tiddler containing multiple procedure definitions only needs a single whitespace pragma at the top of the tiddler, and the setting will be automatically inherited by the procedure definitions without needing the pragma to be repeated.
|
||||
|
||||
!! Using Custom Widgets
|
||||
|
||||
Custom widgets are called in the same way as ordinary built-in widgets:
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
caption: draggable
|
||||
created: 20170406081938627
|
||||
modified: 20220715120213777
|
||||
modified: 20231121101431149
|
||||
tags: Widgets TriggeringWidgets
|
||||
title: DraggableWidget
|
||||
type: text/vnd.tiddlywiki
|
||||
@@ -20,10 +20,11 @@ See DragAndDropMechanism for an overview.
|
||||
|selector|<<.from-version 5.2.2>> Optional CSS Selector to identify a DOM element within the widget that will be used as the drag handle |
|
||||
|class |Optional CSS classes to assign to the DOM element created by the widget. The class `tc-draggable` is added to the the DOM element created by the widget unless the <<.param selector>> attribute is used. The class `tc-dragging` is applied to the DOM element created by the widget while the element is being dragged |
|
||||
|enable |<<.from-version 5.2.3>> Optional value "no" to disable the draggable functionality (defaults to "yes") |
|
||||
|
||||
|startactions |Optional action string that gets invoked when dragging ''starts'' |
|
||||
|endactions |Optional action string that gets invoked when dragging ''ends'' |
|
||||
|dragimagetype |<<.from-version "5.2.0">> Optional type of drag image: `dom` (the default) or `blank` to disable the drag image |
|
||||
|data-* |<<.from-version "5.3.2">> Optional [[data attributes|https://developer.mozilla.org/en-US/docs/Learn/HTML/Howto/Use_data_attributes]] to be assigned to the HTML element |
|
||||
|style.* |<<.from-version "5.3.2">> Optional [[CSS properties|https://developer.mozilla.org/en-US/docs/Web/CSS/Reference]] to be assigned to the HTML element |
|
||||
|
||||
Either or both of the ''tiddler'' and ''filter'' attributes must be specified in order for there to be a payload to drag.
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
caption: droppable
|
||||
created: 20170406082820317
|
||||
modified: 20211009122023265
|
||||
modified: 20231121101447359
|
||||
tags: Widgets TriggeringWidgets
|
||||
title: DroppableWidget
|
||||
type: text/vnd.tiddlywiki
|
||||
@@ -31,6 +31,8 @@ See DragAndDropMechanism for an overview.
|
||||
|class |Optional CSS classes to assign to the draggable element. The class `tc-droppable` is added automatically, and the class `tc-dragover` is applied while an item is being dragged over the droppable element |
|
||||
|tag |Optional tag to override the default of a "div" element when the widget is rendered in block mode, or a "span" element when it is rendered in inline mode |
|
||||
|enable |<<.from-version "5.1.22">> Optional value "no" to disable the droppable functionality (defaults to "yes") |
|
||||
|data-* |<<.from-version "5.3.2">> Optional [[data attributes|https://developer.mozilla.org/en-US/docs/Learn/HTML/Howto/Use_data_attributes]] to be assigned to the HTML element |
|
||||
|style.* |<<.from-version "5.3.2">> Optional [[CSS properties|https://developer.mozilla.org/en-US/docs/Web/CSS/Reference]] to be assigned to the HTML element |
|
||||
|
||||
Within the action string, there are two Variables generated by the DroppableWidget:
|
||||
|
||||
|
||||
@@ -20,7 +20,7 @@ The content of the <<.wid genesis>> widget is used as the content of the dynamic
|
||||
|$mode |An optional override of the parsing mode. May be "inline" or "block" |
|
||||
|//{other attributes starting with $}// |Other attributes starting with a single dollar sign are reserved for future use |
|
||||
|//{attributes starting with $$}// |Attributes starting with two dollar signs are applied as attributes to the output widget, but with the attribute name changed to use a single dollar sign |
|
||||
|//{attributes not starting with $}// |Any other attributes that do not start with a dollar are applied as attributes to the output widget |
|
||||
|//{attributes not starting with $}// |Any other attributes that do not start with a dollar are applied as attributes to the output widget or HTML Element |
|
||||
|
||||
<<.from-version "5.2.6">> If the `$type` attribute is missing or blank, the <<.wlink GenesisWidget>> widget does not render an intrinsic element, instead just rendering its children.
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
caption: link
|
||||
created: 20131024141900000
|
||||
modified: 20190610195105615
|
||||
modified: 20231113093304323
|
||||
tags: Widgets
|
||||
title: LinkWidget
|
||||
type: text/vnd.tiddlywiki
|
||||
@@ -23,6 +23,8 @@ The content of the link widget is rendered within the `<a>` tag representing the
|
||||
|tag |Optional tag to override the default "a" element |
|
||||
|class|Optional CSS classes //in addition to// the default classes (see below)|
|
||||
|overrideClass|<<.from-version "5.1.16">> Optional CSS classes //instead of// the default classes |
|
||||
|data-* |<<.from-version "5.3.2">> Optional [[data attributes|https://developer.mozilla.org/en-US/docs/Learn/HTML/Howto/Use_data_attributes]] to be assigned to the HTML element |
|
||||
|style.* |<<.from-version "5.3.2">> Optional [[CSS properties|https://developer.mozilla.org/en-US/docs/Web/CSS/Reference]] to be assigned to the HTML element |
|
||||
|
||||
The draggable functionality is equivalent to using the DraggableWidget with the ''tiddler'' attribute set to the link target.
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
caption: radio
|
||||
created: 20131212195353929
|
||||
modified: 20211009121654734
|
||||
modified: 20231113093304323
|
||||
tags: Widgets TriggeringWidgets
|
||||
title: RadioWidget
|
||||
type: text/vnd.tiddlywiki
|
||||
@@ -22,6 +22,8 @@ The content of the `<$radio>` widget is displayed within an HTML `<label>` eleme
|
||||
|class |The CSS classes assigned to the label around the radio button <<.from-version "5.1.14">> `tc-radio` is always applied by default, as well as `tc-radio-selected` when selected |
|
||||
|actions|<<.from-version "5.1.23">> Optional string containing ActionWidgets to be triggered when the value changes. <br>The variable: ''actionValue'' is available for the actions |
|
||||
|disabled|<<.from-version "5.1.23">> Optional. Set to "yes" to disable the radio input. Defaults to "no" |
|
||||
|data-* |<<.from-version "5.3.2">> Optional [[data attributes|https://developer.mozilla.org/en-US/docs/Learn/HTML/Howto/Use_data_attributes]] to be assigned to the `<input>` HTML element |
|
||||
|style.* |<<.from-version "5.3.2">> Optional [[CSS properties|https://developer.mozilla.org/en-US/docs/Web/CSS/Reference]] to be assigned to the `<input>` HTML element |
|
||||
|
||||
!! Field Mode
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
caption: range
|
||||
created: 20171102134825376
|
||||
modified: 20211009121606405
|
||||
modified: 20231113093304323
|
||||
tags: Widgets TriggeringWidgets
|
||||
title: RangeWidget
|
||||
type: text/vnd.tiddlywiki
|
||||
@@ -26,6 +26,8 @@ The content of the `<$range>` widget is ignored.
|
||||
|actionsStart|<<.from-version "5.1.23">> Optional, A string containing ~ActionWidgets to be triggered when the "handle" is ''clicked''. <br>The variable: ''actionValueHasChanged'' is always `no` here|
|
||||
|actionsStop|<<.from-version "5.1.23">> Optional, A string containing ~ActionWidgets to be triggered when the "handle" is ''released''. <br>The variable: ''actionValueHasChanged'' is `yes`, ''if'' the new-value is different to the start-value |
|
||||
|disabled|<<.from-version "5.1.23">> Optional, disables the range input if set to "yes". Defaults to "no"|
|
||||
|data-* |<<.from-version "5.3.2">> Optional [[data attributes|https://developer.mozilla.org/en-US/docs/Learn/HTML/Howto/Use_data_attributes]] to be assigned to the `<input>` HTML element |
|
||||
|style.* |<<.from-version "5.3.2">> Optional [[CSS properties|https://developer.mozilla.org/en-US/docs/Web/CSS/Reference]] to be assigned to the `<input>` HTML element |
|
||||
|
||||
! Examples
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
caption: select
|
||||
created: 20131024141900000
|
||||
modified: 20211108165037846
|
||||
modified: 20231113093304323
|
||||
tags: TriggeringWidgets Widgets
|
||||
title: SelectWidget
|
||||
type: text/vnd.tiddlywiki
|
||||
@@ -42,6 +42,9 @@ The content of the `<$select>` widget should be one or more HTML `<option>` or `
|
||||
|actions |A string containing ActionWidgets to be triggered when the key combination is detected |
|
||||
|focus |<<.from-version "5.2.4">> Optional. Set to "yes" to automatically focus the HTML select element after creation |
|
||||
|tabindex |<<.from-version "5.3.1">> Optional. Sets the `tabindex` attribute of the HTML select element to the given value |
|
||||
|data-* |<<.from-version "5.3.2">> Optional [[data attributes|https://developer.mozilla.org/en-US/docs/Learn/HTML/Howto/Use_data_attributes]] to be assigned to the HTML element |
|
||||
|style.* |<<.from-version "5.3.2">> Optional [[CSS properties|https://developer.mozilla.org/en-US/docs/Web/CSS/Reference]] to be assigned to the HTML element |
|
||||
|
||||
! Examples
|
||||
|
||||
!! Simple Lists
|
||||
|
||||
@@ -18,11 +18,11 @@ Transclusion is the underlying mechanism for many higher level wikitext features
|
||||
Here is a complete example showing the important features of the <<.wlink TranscludeWidget>> widget:
|
||||
|
||||
```
|
||||
\procedure mymacro(name,age)
|
||||
\procedure myproc(name,age)
|
||||
My name is <<name>> and my age is <<age>>.
|
||||
\end
|
||||
|
||||
<$transclude $variable="mymacro" name="James" age="19"/>
|
||||
<$transclude $variable="myproc" name="James" age="19"/>
|
||||
```
|
||||
|
||||
* `\procedure` defines a variable as a procedure with two parameters, ''name'' and ''age''
|
||||
|
||||
@@ -49,7 +49,7 @@
|
||||
"static": [
|
||||
"--render","$:/core/templates/static.template.html","static.html","text/plain",
|
||||
"--render","$:/core/templates/alltiddlers.template.html","alltiddlers.html","text/plain",
|
||||
"--render","[!is[system]]","[encodeuricomponent[]addprefix[static/]addsuffix[.html]]","text/plain","$:/core/templates/static.tiddler.html",
|
||||
"--render","[!is[system]]","[encodeuricomponent[]addprefix[static/]addsuffix[.html]]","text/plain","$:/core/templates/static.tiddler.html",
|
||||
"--render","$:/core/templates/static.template.css","static/static.css","text/plain"],
|
||||
"external-js": [
|
||||
"--render","$:/core/save/offline-external-js","[[external-]addsuffix<version>addsuffix[.html]]","text/plain",
|
||||
|
||||
@@ -67,6 +67,8 @@ More/Caption: Más
|
||||
More/Hint: Otras acciones
|
||||
NewHere/Caption: Nuevo aquí
|
||||
NewHere/Hint: Crea un nuevo tiddler etiquetado con el título de este tiddler
|
||||
NetworkActivity/Caption: actividad de red
|
||||
NetworkActivity/Hint: Cancelar la actividad de red
|
||||
NewJournal/Caption: Nueva entrada
|
||||
NewJournal/Hint: Crea una nueva entrada de diario
|
||||
NewJournalHere/Caption: Entrada nueva aquí
|
||||
|
||||
@@ -1,11 +1,13 @@
|
||||
title: $:/language/Docs/Fields/
|
||||
|
||||
_canonical_uri: Dirección (URI) completa -absoluta o relativa- de un tiddler externo de imagen
|
||||
author: Nombre del autor de un plugin
|
||||
bag: Nombre de la bolsa de la que procede un tiddler
|
||||
caption: Texto que se muestra en una pestaña o botón, con independencia del título del tiddler que lo define
|
||||
code-body: La plantilla de vista mostrará el tiddler como código si se establece en ''yes''
|
||||
color: Valor CSS del color de fondo asociado a un tiddler
|
||||
component: Nombre del componente responsable de un [[tiddler de alerta|AlertMechanism]]
|
||||
core-version: Para un plugin, indica con qué versión de TiddlyWiki es compatible
|
||||
current-tiddler: Usado para incluir el tiddler superior en una [[historia|HistoryMechanism]]
|
||||
created: Fecha de creación del tiddler
|
||||
creator: Nombre del autor del tiddler
|
||||
@@ -22,7 +24,9 @@ list-before: Título del tiddler antes del que el presente será añadido a una
|
||||
list-after: Título del tiddler tras el que el presente será añadido a una lista de tiddlers.
|
||||
modified: Fecha y hora de última modificación
|
||||
modifier: Nombre del tiddler asociado con quien modificó por última vez el presente tiddler
|
||||
module-type: Para los tiddlers javascript, especifica de qué tipo de módulo se trata
|
||||
name: Nombre asociado con un complemento o extensión
|
||||
parent-plugin: Para un plugin, especifica de qué plugin es un subplugin
|
||||
plugin-priority: Valor numérico que indica la prioridad de un complemento o extensión
|
||||
plugin-type: Tipo de complemento o extensión
|
||||
revision: Revisión del tiddler existente en el servidor
|
||||
|
||||
@@ -18,7 +18,7 @@ Todos los parámetros son opcionales con valores predeterminados seguros y se pu
|
||||
* ''anon-username'' - el nombre de usuario para firmar ediciones de usuarios anónimos
|
||||
* ''username'' - nombre de usuario opcional para autenticación básica
|
||||
* ''password'' - contraseña opcional para autenticación básica
|
||||
* ''authenticated-user-header'' - nombre opcional del encabezado que se utilizará para la autenticación de confianza
|
||||
* ''authenticated-user-header'' - nombre opcional del encabezado de solicitud que se utilizará para la autenticación de confianza.
|
||||
* ''readers'' - lista separada por comas de los usuarios autorizados a leer de este wiki
|
||||
* ''writers'' - lista separada por comas de los usuarios autorizados a escribir en este wiki
|
||||
* ''csrf-disable'' - establecer a "yes" para deshabilitar las comprobaciones CSRF (el valor predeterminado es "no")
|
||||
|
||||
@@ -4,7 +4,7 @@ description: Guarda un wiki en una nueva carpeta de wiki
|
||||
<<.from-version "5.1.20">> Guarda el wiki actual como una carpeta de wiki, incluidos tiddlers, complementos y configuración:
|
||||
|
||||
```
|
||||
--savewikifolder <wikifolderpath> [<filter>]
|
||||
--savewikifolder <wikifolderpath> [<filter>] [ [<name>=<value>] ]*
|
||||
```
|
||||
|
||||
* La carpeta wiki de destino debe estar vacía o no existir
|
||||
@@ -12,8 +12,23 @@ description: Guarda un wiki en una nueva carpeta de wiki
|
||||
* Los complementos de la biblioteca oficial de complementos se reemplazan con referencias a esos complementos en el archivo `tiddlywiki.info`
|
||||
* Los complementos personalizados se descomprimen en su propia carpeta
|
||||
|
||||
Se admiten las siguientes opciones:
|
||||
|
||||
* ''filter'': una expresión de filtro que define los tiddlers que se incluirán en la salida.
|
||||
* ''explodePlugins'': por defecto "yes".
|
||||
** ''yes'' desplegará los plugins en archivos tiddler separados y los guardará en el directorio de plugins dentro de la carpeta wiki
|
||||
** ''no'' no realizará el despliegue del plugin en sus archivos tiddler constituyentes si no que guardará el plugin como un único tiddler JSON en la carpeta tiddlers.
|
||||
|
||||
Ten en cuenta que ambas opciones ''explodePlugins'' producirán carpetas wiki que construirán exactamente el mismo wiki original. La diferencia radica en cómo se representan los plugins en la carpeta wiki.
|
||||
|
||||
Un uso común es convertir un archivo HTML de TiddlyWiki en una carpeta wiki:
|
||||
|
||||
```
|
||||
tiddlywiki --load ./mywiki.html --savewikifolder ./mywikifolder
|
||||
```
|
||||
|
||||
Guarda el plugin en el directorio tiddlers de la carpeta wiki de destino:
|
||||
|
||||
```
|
||||
tiddlywiki --load ./mywiki.html --savewikifolder ./mywikifolder explodePlugins=no
|
||||
```
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
title: $:/language/Help/server
|
||||
description: Proporciona interfaz de servidor HTTP a TiddlyWiki (en desuso a favor del nuevo comando listen)
|
||||
description: (en desuso: utiliza el comando 'listen') Proporciona interfaz de servidor HTTP a TiddlyWiki
|
||||
|
||||
Comando obsoleto para servir una wiki a través de HTTP.
|
||||
|
||||
|
||||
@@ -25,6 +25,8 @@ Encryption/RepeatPassword: Repite la contraseña
|
||||
Encryption/PasswordNoMatch: Las contraseñas no coinciden
|
||||
Encryption/SetPassword: Establecer contraseña
|
||||
Error/Caption: Error
|
||||
Error/DeserializeOperator/MissingOperand: Error de filtro: Falta el operando 'deserialize
|
||||
Error/DeserializeOperator/UnknownDeserializer: Error de filtro: Deserializador desconocido proporcionado como operando para el operador 'deserialize'.
|
||||
Error/Filter: Error de filtro
|
||||
Error/FilterSyntax: Error de sintaxis en la expresión de filtro
|
||||
Error/FilterRunPrefix: Error en Filtro: Prefijo desconocido para la ejecución del filtro
|
||||
@@ -40,6 +42,7 @@ Error/RetrievingSkinny: Error al recuperar la lista resumida de tiddlers
|
||||
Error/SavingToTWEdit: Error al guardar en TWEdit
|
||||
Error/WhileSaving: Error al guardar
|
||||
Error/XMLHttpRequest: Código de error XMLHttpRequest
|
||||
Error/ZoominTextNode: Error de vista de historia: Parece que has intentado interactuar con un tiddler que se muestra en un contenedor personalizado. La causa más probable es el uso de `$:/tags/StoryTiddlerTemplateFilter` con una plantilla que contiene texto o espacios en blanco al principio. Utiliza el pragma `\whitespace trim` y asegúrate de que todo el contenido del tiddler está envuelto en un único elemento HTML. El texto que causó este problema:
|
||||
InternalJavaScriptError/Hint: Hay un problema. Se recomienda que reinicies TiddlyWiki
|
||||
InternalJavaScriptError/Title: Error interno de JavaScript
|
||||
LayoutSwitcher/Description: Abre el selector de diseño
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
title: $:/SiteTitle
|
||||
|
||||
Mi ~TiddlyWiki
|
||||
Mi TiddlyWiki
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
title: $:/language/Help/server
|
||||
description: Tworzy serwer HTTP wystawiający TiddlyWiki (zalecamy użycie komendy "--listen" zamiast tej)
|
||||
description: (nieaktualne: patrz komenda 'listen') Tworzy serwer HTTP wystawiający TiddlyWiki (zalecamy użycie komendy "--listen" zamiast tej)
|
||||
|
||||
Dawna komenda do stawiania serwera wystawiającego wiki.
|
||||
|
||||
|
||||
@@ -3,4 +3,4 @@ title: $:/language/Exporters/
|
||||
StaticRiver: 静态 HTML
|
||||
JsonFile: JSON 文件
|
||||
CsvFile: CSV 文件
|
||||
TidFile: ".tid" 文件
|
||||
TidFile: TID 文本文件
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
title: $:/language/Help/server
|
||||
description: 提供一个 HTTP 服务器界面到 TiddlyWiki (已弃用,支持新的 listen 命令)
|
||||
description: (已弃用:请参阅 'listen' 命令)提供一个 HTTP 服务器界面到 TiddlyWiki
|
||||
|
||||
在服务器中内置 TiddlyWiki5 是非常简单。虽与 TiddlyWeb 兼容,但不支持许多健全互联网面向的使用方式所需的功能。
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
title: $:/language/Docs/Types/image/svg+xml
|
||||
description: 结构式矢量图
|
||||
description: SVG 图像
|
||||
name: image/svg+xml
|
||||
group: 图像
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
title: $:/language/Docs/Types/image/x-icon
|
||||
description: 图标
|
||||
description: ICO 图标
|
||||
name: image/x-icon
|
||||
group: 图像
|
||||
|
||||
@@ -3,4 +3,4 @@ title: $:/language/Exporters/
|
||||
StaticRiver: 靜態 HTML
|
||||
JsonFile: JSON 檔案
|
||||
CsvFile: CSV 檔案
|
||||
TidFile: ".tid" 檔案
|
||||
TidFile: TID 文字檔案
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
title: $:/language/Help/server
|
||||
description: 提供一個 HTTP 伺服器介面到 TiddlyWiki (已棄用,支持新的 listen 命令)
|
||||
description: (已棄用:請參閱 'listen' 命令)提供一個 HTTP 伺服器介面到 TiddlyWiki
|
||||
|
||||
在伺服器中內建 TiddlyWiki5 是非常簡單。雖與 TiddlyWeb 相容,但不支援許多健全網際網路面向的使用方式所需的功能。
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
title: $:/language/Docs/Types/image/svg+xml
|
||||
description: 結構式向量圖
|
||||
description: SVG 圖片
|
||||
name: image/svg+xml
|
||||
group: 圖片
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
title: $:/language/Docs/Types/image/x-icon
|
||||
description: 圖示
|
||||
description: ICO 圖示
|
||||
name: image/x-icon
|
||||
group: 圖片
|
||||
|
||||
@@ -547,3 +547,5 @@ Eric Haberstroh, @pille1842, 2023/07/23
|
||||
@catter-fly, 2023/07/27
|
||||
|
||||
@cmo-pomerium, 2023/08/03
|
||||
|
||||
BuckarooBanzay, @BuckarooBanzay, 2023/09/01
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "tiddlywiki",
|
||||
"preferGlobal": "true",
|
||||
"version": "5.3.1",
|
||||
"version": "5.3.2-prerelease",
|
||||
"author": "Jeremy Ruston <jeremy@jermolene.com>",
|
||||
"description": "a non-linear personal web notebook",
|
||||
"contributors": [
|
||||
|
||||
@@ -5,13 +5,13 @@ tags: [[$:/tags/Stylesheet]]
|
||||
|
||||
.tc-is-comment-header {
|
||||
padding: 0.25em;
|
||||
border: 2px solid #c1e1ea;
|
||||
border: 2px solid <<colour message-foreground>>;
|
||||
border-radius: 4px;
|
||||
background: #f1fcff;
|
||||
background: <<colour message-background>>;
|
||||
}
|
||||
|
||||
.tc-comments-segment {
|
||||
border-top: 2px solid #d7eef4;
|
||||
border-top: 2px solid <<colour message-border>>;
|
||||
}
|
||||
|
||||
.tc-comment-button button {
|
||||
@@ -25,7 +25,7 @@ tags: [[$:/tags/Stylesheet]]
|
||||
}
|
||||
|
||||
.tc-comment-button button svg {
|
||||
fill: #26cb56;
|
||||
fill: <<colour download-background>>;
|
||||
height: 2em;
|
||||
width: 2em;
|
||||
}
|
||||
@@ -44,18 +44,18 @@ tags: [[$:/tags/Stylesheet]]
|
||||
|
||||
.tc-comment-entry {
|
||||
position: relative;
|
||||
border: 2px solid #c1e1ea;
|
||||
border: 2px solid <<colour message-border>>;
|
||||
border-radius: 4px;
|
||||
margin: 0.5em 0 0 0;
|
||||
background: #f1fcff;
|
||||
background: <<colour message-background>>;
|
||||
}
|
||||
|
||||
.tc-comment-entry-heading {
|
||||
font-size: 0.7em;
|
||||
font-weight: bold;
|
||||
text-transform: uppercase;
|
||||
background: #d7eef4;
|
||||
color: #5B6D80;
|
||||
background: <<colour message-background>>;
|
||||
color: <<colour message-foreground>>;
|
||||
padding: 0 0.5em;
|
||||
}
|
||||
|
||||
|
||||
@@ -50,7 +50,7 @@ For help and support, visit [[the TiddlyWiki discussion forum|http://groups.goog
|
||||
|
||||
</div>
|
||||
|
||||
//Your data will not leave your browser. <a href="#" download="upgrade.html">Download</a> this upgrader to use it offline//
|
||||
//Your data will not leave your browser. <a href="" download="upgrade.html">Download</a> this upgrader to use it offline//
|
||||
|
||||
//If clicking the link doesn't work, right-click the link and save it that way.//
|
||||
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
title: $:/themes/tiddlywiki/vanilla/base
|
||||
tags: [[$:/tags/Stylesheet]]
|
||||
list-before:
|
||||
code-body: yes
|
||||
|
||||
\define custom-background-datauri()
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
title: $:/themes/tiddlywiki/vanilla/settings/
|
||||
|
||||
fontfamily: -apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif,Apple Color Emoji,Segoe UI Emoji;
|
||||
fontfamily: -apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif,Apple Color Emoji,Segoe UI Emoji
|
||||
codefontfamily: "SFMono-Regular",Consolas,"Liberation Mono",Menlo,Courier,monospace
|
||||
backgroundimageattachment: fixed
|
||||
backgroundimagesize: auto
|
||||
|
||||
Reference in New Issue
Block a user