mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2024-11-15 22:34:51 +00:00
Merge branch 'master' into this-tiddler-reference
This commit is contained in:
commit
4919b4f239
@ -359,14 +359,14 @@ node $TW5_BUILD_TIDDLYWIKI \
|
||||
|
||||
# Delete any existing static content
|
||||
|
||||
rm $TW5_BUILD_OUTPUT/languages/de-AT/static/*
|
||||
rm $TW5_BUILD_OUTPUT/languages/de-DE/static/*
|
||||
rm $TW5_BUILD_OUTPUT/languages/es-ES/static/*
|
||||
rm $TW5_BUILD_OUTPUT/languages/fr-FR/static/*
|
||||
rm $TW5_BUILD_OUTPUT/languages/ja-JP/static/*
|
||||
rm $TW5_BUILD_OUTPUT/languages/ko-KR/static/*
|
||||
rm $TW5_BUILD_OUTPUT/languages/zh-Hans/static/*
|
||||
rm $TW5_BUILD_OUTPUT/languages/zh-Hant/static/*
|
||||
rm -rf $TW5_BUILD_OUTPUT/languages/de-AT/static/*
|
||||
rm -rf $TW5_BUILD_OUTPUT/languages/de-DE/static/*
|
||||
rm -rf $TW5_BUILD_OUTPUT/languages/es-ES/static/*
|
||||
rm -rf $TW5_BUILD_OUTPUT/languages/fr-FR/static/*
|
||||
rm -rf $TW5_BUILD_OUTPUT/languages/ja-JP/static/*
|
||||
rm -rf $TW5_BUILD_OUTPUT/languages/ko-KR/static/*
|
||||
rm -rf $TW5_BUILD_OUTPUT/languages/zh-Hans/static/*
|
||||
rm -rf $TW5_BUILD_OUTPUT/languages/zh-Hant/static/*
|
||||
|
||||
# /languages/de-AT/index.html Demo wiki with de-AT language
|
||||
# /languages/de-AT/empty.html Empty wiki with de-AT language
|
||||
|
@ -313,7 +313,7 @@ $tw.utils.getLocationHash = function() {
|
||||
var idx = href.indexOf('#');
|
||||
if(idx === -1) {
|
||||
return "#";
|
||||
} else if(idx < href.length-1 && href[idx+1] === '#') {
|
||||
} else if(href.substr(idx + 1,1) === "#" || href.substr(idx + 1,3) === "%23") {
|
||||
// Special case: ignore location hash if it itself starts with a #
|
||||
return "#";
|
||||
} else {
|
||||
@ -375,7 +375,7 @@ $tw.utils.stringifyList = function(value) {
|
||||
var result = new Array(value.length);
|
||||
for(var t=0, l=value.length; t<l; t++) {
|
||||
var entry = value[t] || "";
|
||||
if(entry.indexOf(" ") !== -1) {
|
||||
if(entry.match(/[^\S\xA0]/mg)) {
|
||||
result[t] = "[[" + entry + "]]";
|
||||
} else {
|
||||
result[t] = entry;
|
||||
|
12
core/images/save-button-dynamic.tid
Normal file
12
core/images/save-button-dynamic.tid
Normal file
@ -0,0 +1,12 @@
|
||||
title: $:/core/images/save-button-dynamic
|
||||
tags: $:/tags/Image
|
||||
|
||||
<svg width="22pt" height="22pt" class="tc-image-save-button-dynamic tc-image-button" viewBox="0 0 128 128">
|
||||
<g class="tc-image-save-button-dynamic-clean">
|
||||
<path fill-rule="evenodd" d="M120.783 34.33c4.641 8.862 7.266 18.948 7.266 29.646 0 35.347-28.653 64-64 64-35.346 0-64-28.653-64-64 0-35.346 28.654-64 64-64 18.808 0 35.72 8.113 47.43 21.03l2.68-2.68c3.13-3.13 8.197-3.132 11.321-.008 3.118 3.118 3.121 8.193-.007 11.32l-4.69 4.691zm-12.058 12.058a47.876 47.876 0 013.324 17.588c0 26.51-21.49 48-48 48s-48-21.49-48-48 21.49-48 48-48c14.39 0 27.3 6.332 36.098 16.362L58.941 73.544 41.976 56.578c-3.127-3.127-8.201-3.123-11.32-.005-3.123 3.124-3.119 8.194.006 11.319l22.617 22.617a7.992 7.992 0 005.659 2.347c2.05 0 4.101-.783 5.667-2.349l44.12-44.12z"/>
|
||||
</g>
|
||||
<g class="tc-image-save-button-dynamic-dirty">
|
||||
<path d="M64.856912,0 C100.203136,0 128.856912,28.653776 128.856912,64 C128.856912,99.346224 100.203136,128 64.856912,128 C29.510688,128 0.856911958,99.346224 0.856911958,64 C0.856911958,28.653776 29.510688,0 64.856912,0 Z M64.856912,16 C38.347244,16 16.856912,37.490332 16.856912,64 C16.856912,90.509668 38.347244,112 64.856912,112 C91.3665799,112 112.856912,90.509668 112.856912,64 C112.856912,37.490332 91.3665799,16 64.856912,16 Z"></path>
|
||||
<circle cx="65" cy="64" r="32"></circle>
|
||||
</g>
|
||||
</svg>
|
@ -1,11 +1,13 @@
|
||||
title: $:/language/Docs/Fields/
|
||||
|
||||
_canonical_uri: The full URI of an external image tiddler
|
||||
author: Name of the author of a plugin
|
||||
bag: The name of the bag from which a tiddler came
|
||||
caption: The text to be displayed on a tab or button
|
||||
code-body: The view template will display the tiddler as code if set to ''yes''
|
||||
color: The CSS color value associated with a tiddler
|
||||
component: The name of the component responsible for an [[alert tiddler|AlertMechanism]]
|
||||
core-version: For a plugin, indicates what version of TiddlyWiki with which it is compatible
|
||||
current-tiddler: Used to cache the top tiddler in a [[history list|HistoryMechanism]]
|
||||
created: The date a tiddler was created
|
||||
creator: The name of the person who created a tiddler
|
||||
@ -22,7 +24,9 @@ list-before: If set, the title of a tiddler before which this tiddler should be
|
||||
list-after: If set, the title of the tiddler after which this tiddler should be added to the ordered list of tiddler titles, or at the end of the list if this field is present but empty
|
||||
modified: The date and time at which a tiddler was last modified
|
||||
modifier: The tiddler title associated with the person who last modified a tiddler
|
||||
module-type: For javascript tiddlers, specifies what kind of module it is
|
||||
name: The human readable name associated with a plugin tiddler
|
||||
parent-plugin: For a plugin, specifies which plugin of which it is a sub-plugin
|
||||
plugin-priority: A numerical value indicating the priority of a plugin tiddler
|
||||
plugin-type: The type of plugin in a plugin tiddler
|
||||
revision: The revision of the tiddler held at the server
|
||||
|
@ -40,6 +40,7 @@ Error/RetrievingSkinny: Error retrieving skinny tiddler list
|
||||
Error/SavingToTWEdit: Error saving to TWEdit
|
||||
Error/WhileSaving: Error while saving
|
||||
Error/XMLHttpRequest: XMLHttpRequest error code
|
||||
Error/ZoominTextNode: Story View Error: It appears you tried to interact with a tiddler that displays in a custom container. This is most likely caused by using `$:/tags/StoryTiddlerTemplateFilter` with a template that contains text or whitespace at the start. Please use the pragma `\whitespace trim` and ensure the whole contents of the tiddler is wrapped in a single HTML element. The text that caused this issue:
|
||||
InternalJavaScriptError/Title: Internal JavaScript Error
|
||||
InternalJavaScriptError/Hint: Well, this is embarrassing. It is recommended that you restart TiddlyWiki by refreshing your browser
|
||||
LayoutSwitcher/Description: Open the layout switcher
|
||||
|
@ -1,21 +0,0 @@
|
||||
title: $:/language/Modals/SaveInstructions
|
||||
subtitle: Save your work
|
||||
footer: <$button message="tm-close-tiddler">Close</$button>
|
||||
help: https://tiddlywiki.com/static/SavingChanges.html
|
||||
|
||||
Your changes to this wiki need to be saved as a ~TiddlyWiki HTML file.
|
||||
|
||||
!!! Desktop browsers
|
||||
|
||||
# Select ''Save As'' from the ''File'' menu
|
||||
# Choose a filename and location
|
||||
#* Some browsers also require you to explicitly specify the file saving format as ''Webpage, HTML only'' or similar
|
||||
# Close this tab
|
||||
|
||||
!!! Smartphone browsers
|
||||
|
||||
# Create a bookmark to this page
|
||||
#* If you've got iCloud or Google Sync set up then the bookmark will automatically sync to your desktop where you can open it and save it as above
|
||||
# Close this tab
|
||||
|
||||
//If you open the bookmark again in Mobile Safari you will see this message again. If you want to go ahead and use the file, just click the ''close'' button below//
|
@ -57,7 +57,7 @@ Command.prototype.execute = function() {
|
||||
exportPath = path.resolve(outputPath,macroPath + extension);
|
||||
}
|
||||
}
|
||||
var finalPath = exportPath || path.resolve(pathname,encodeURIComponent(title) + extension);
|
||||
var finalPath = exportPath || path.resolve(pathname,$tw.utils.encodeURIComponentExtended(title) + extension);
|
||||
$tw.utils.createFileDirectories(finalPath);
|
||||
fs.writeFileSync(finalPath,text,"utf8");
|
||||
});
|
||||
|
@ -65,7 +65,7 @@ Command.prototype.execute = function() {
|
||||
$tw.utils.each(filteredPluginList,function(title) {
|
||||
var tiddler = containerData.tiddlers[title];
|
||||
// Save each JSON file and collect the skinny data
|
||||
var pathname = path.resolve(self.commander.outputPath,basepath + encodeURIComponent(title) + ".json");
|
||||
var pathname = path.resolve(self.commander.outputPath,basepath + $tw.utils.encodeURIComponentExtended(title) + ".json");
|
||||
$tw.utils.createFileDirectories(pathname);
|
||||
fs.writeFileSync(pathname,JSON.stringify(tiddler),"utf8");
|
||||
// Collect the skinny list data
|
||||
|
@ -45,7 +45,7 @@ Command.prototype.execute = function() {
|
||||
var tiddler = self.commander.wiki.getTiddler(title),
|
||||
type = tiddler.fields.type || "text/vnd.tiddlywiki",
|
||||
contentTypeInfo = $tw.config.contentTypeInfo[type] || {encoding: "utf8"},
|
||||
filename = path.resolve(pathname,encodeURIComponent(title));
|
||||
filename = path.resolve(pathname,$tw.utils.encodeURIComponentExtended(title));
|
||||
fs.writeFileSync(filename,tiddler.fields.text,contentTypeInfo.encoding);
|
||||
});
|
||||
return null;
|
||||
|
@ -30,7 +30,7 @@ exports.textPrimitives.wikiLink = exports.textPrimitives.upperLetter + "+" +
|
||||
exports.textPrimitives.upperLetter +
|
||||
exports.textPrimitives.anyLetter + "*";
|
||||
|
||||
exports.htmlEntities = {quot:34, amp:38, apos:39, lt:60, gt:62, nbsp:160, iexcl:161, cent:162, pound:163, curren:164, yen:165, brvbar:166, sect:167, uml:168, copy:169, ordf:170, laquo:171, not:172, shy:173, reg:174, macr:175, deg:176, plusmn:177, sup2:178, sup3:179, acute:180, micro:181, para:182, middot:183, cedil:184, sup1:185, ordm:186, raquo:187, frac14:188, frac12:189, frac34:190, iquest:191, Agrave:192, Aacute:193, Acirc:194, Atilde:195, Auml:196, Aring:197, AElig:198, Ccedil:199, Egrave:200, Eacute:201, Ecirc:202, Euml:203, Igrave:204, Iacute:205, Icirc:206, Iuml:207, ETH:208, Ntilde:209, Ograve:210, Oacute:211, Ocirc:212, Otilde:213, Ouml:214, times:215, Oslash:216, Ugrave:217, Uacute:218, Ucirc:219, Uuml:220, Yacute:221, THORN:222, szlig:223, agrave:224, aacute:225, acirc:226, atilde:227, auml:228, aring:229, aelig:230, ccedil:231, egrave:232, eacute:233, ecirc:234, euml:235, igrave:236, iacute:237, icirc:238, iuml:239, eth:240, ntilde:241, ograve:242, oacute:243, ocirc:244, otilde:245, ouml:246, divide:247, oslash:248, ugrave:249, uacute:250, ucirc:251, uuml:252, yacute:253, thorn:254, yuml:255, OElig:338, oelig:339, Scaron:352, scaron:353, Yuml:376, fnof:402, circ:710, tilde:732, Alpha:913, Beta:914, Gamma:915, Delta:916, Epsilon:917, Zeta:918, Eta:919, Theta:920, Iota:921, Kappa:922, Lambda:923, Mu:924, Nu:925, Xi:926, Omicron:927, Pi:928, Rho:929, Sigma:931, Tau:932, Upsilon:933, Phi:934, Chi:935, Psi:936, Omega:937, alpha:945, beta:946, gamma:947, delta:948, epsilon:949, zeta:950, eta:951, theta:952, iota:953, kappa:954, lambda:955, mu:956, nu:957, xi:958, omicron:959, pi:960, rho:961, sigmaf:962, sigma:963, tau:964, upsilon:965, phi:966, chi:967, psi:968, omega:969, thetasym:977, upsih:978, piv:982, ensp:8194, emsp:8195, thinsp:8201, zwnj:8204, zwj:8205, lrm:8206, rlm:8207, ndash:8211, mdash:8212, lsquo:8216, rsquo:8217, sbquo:8218, ldquo:8220, rdquo:8221, bdquo:8222, dagger:8224, Dagger:8225, bull:8226, hellip:8230, permil:8240, prime:8242, Prime:8243, lsaquo:8249, rsaquo:8250, oline:8254, frasl:8260, euro:8364, image:8465, weierp:8472, real:8476, trade:8482, alefsym:8501, larr:8592, uarr:8593, rarr:8594, darr:8595, harr:8596, crarr:8629, lArr:8656, uArr:8657, rArr:8658, dArr:8659, hArr:8660, forall:8704, part:8706, exist:8707, empty:8709, nabla:8711, isin:8712, notin:8713, ni:8715, prod:8719, sum:8721, minus:8722, lowast:8727, radic:8730, prop:8733, infin:8734, ang:8736, and:8743, or:8744, cap:8745, cup:8746, int:8747, there4:8756, sim:8764, cong:8773, asymp:8776, ne:8800, equiv:8801, le:8804, ge:8805, sub:8834, sup:8835, nsub:8836, sube:8838, supe:8839, oplus:8853, otimes:8855, perp:8869, sdot:8901, lceil:8968, rceil:8969, lfloor:8970, rfloor:8971, lang:9001, rang:9002, loz:9674, spades:9824, clubs:9827, hearts:9829, diams:9830 };
|
||||
exports.htmlEntities = {quot:34, dollar:36, amp:38, apos:39, lt:60, gt:62, nbsp:160, iexcl:161, cent:162, pound:163, curren:164, yen:165, brvbar:166, sect:167, uml:168, copy:169, ordf:170, laquo:171, not:172, shy:173, reg:174, macr:175, deg:176, plusmn:177, sup2:178, sup3:179, acute:180, micro:181, para:182, middot:183, cedil:184, sup1:185, ordm:186, raquo:187, frac14:188, frac12:189, frac34:190, iquest:191, Agrave:192, Aacute:193, Acirc:194, Atilde:195, Auml:196, Aring:197, AElig:198, Ccedil:199, Egrave:200, Eacute:201, Ecirc:202, Euml:203, Igrave:204, Iacute:205, Icirc:206, Iuml:207, ETH:208, Ntilde:209, Ograve:210, Oacute:211, Ocirc:212, Otilde:213, Ouml:214, times:215, Oslash:216, Ugrave:217, Uacute:218, Ucirc:219, Uuml:220, Yacute:221, THORN:222, szlig:223, agrave:224, aacute:225, acirc:226, atilde:227, auml:228, aring:229, aelig:230, ccedil:231, egrave:232, eacute:233, ecirc:234, euml:235, igrave:236, iacute:237, icirc:238, iuml:239, eth:240, ntilde:241, ograve:242, oacute:243, ocirc:244, otilde:245, ouml:246, divide:247, oslash:248, ugrave:249, uacute:250, ucirc:251, uuml:252, yacute:253, thorn:254, yuml:255, OElig:338, oelig:339, Scaron:352, scaron:353, Yuml:376, fnof:402, circ:710, tilde:732, Alpha:913, Beta:914, Gamma:915, Delta:916, Epsilon:917, Zeta:918, Eta:919, Theta:920, Iota:921, Kappa:922, Lambda:923, Mu:924, Nu:925, Xi:926, Omicron:927, Pi:928, Rho:929, Sigma:931, Tau:932, Upsilon:933, Phi:934, Chi:935, Psi:936, Omega:937, alpha:945, beta:946, gamma:947, delta:948, epsilon:949, zeta:950, eta:951, theta:952, iota:953, kappa:954, lambda:955, mu:956, nu:957, xi:958, omicron:959, pi:960, rho:961, sigmaf:962, sigma:963, tau:964, upsilon:965, phi:966, chi:967, psi:968, omega:969, thetasym:977, upsih:978, piv:982, ensp:8194, emsp:8195, thinsp:8201, zwnj:8204, zwj:8205, lrm:8206, rlm:8207, ndash:8211, mdash:8212, lsquo:8216, rsquo:8217, sbquo:8218, ldquo:8220, rdquo:8221, bdquo:8222, dagger:8224, Dagger:8225, bull:8226, hellip:8230, permil:8240, prime:8242, Prime:8243, lsaquo:8249, rsaquo:8250, oline:8254, frasl:8260, euro:8364, image:8465, weierp:8472, real:8476, trade:8482, alefsym:8501, larr:8592, uarr:8593, rarr:8594, darr:8595, harr:8596, crarr:8629, lArr:8656, uArr:8657, rArr:8658, dArr:8659, hArr:8660, forall:8704, part:8706, exist:8707, empty:8709, nabla:8711, isin:8712, notin:8713, ni:8715, prod:8719, sum:8721, minus:8722, lowast:8727, radic:8730, prop:8733, infin:8734, ang:8736, and:8743, or:8744, cap:8745, cup:8746, int:8747, there4:8756, sim:8764, cong:8773, asymp:8776, ne:8800, equiv:8801, le:8804, ge:8805, sub:8834, sup:8835, nsub:8836, sube:8838, supe:8839, oplus:8853, otimes:8855, perp:8869, sdot:8901, lceil:8968, rceil:8969, lfloor:8970, rfloor:8971, lang:9001, rang:9002, loz:9674, spades:9824, clubs:9827, hearts:9829, diams:9830 };
|
||||
|
||||
exports.htmlVoidElements = "area,base,br,col,command,embed,hr,img,input,keygen,link,meta,param,source,track,wbr".split(",");
|
||||
|
||||
|
@ -177,9 +177,11 @@ FramedEngine.prototype.fixHeight = function() {
|
||||
Focus the engine node
|
||||
*/
|
||||
FramedEngine.prototype.focus = function() {
|
||||
if(this.domNode.focus && this.domNode.select) {
|
||||
if(this.domNode.focus) {
|
||||
this.domNode.focus();
|
||||
this.domNode.select();
|
||||
}
|
||||
if(this.domNode.select) {
|
||||
$tw.utils.setSelectionByPosition(this.domNode,this.widget.editFocusSelectFromStart,this.widget.editFocusSelectFromEnd);
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -119,10 +119,12 @@ SimpleEngine.prototype.fixHeight = function() {
|
||||
/*
|
||||
Focus the engine node
|
||||
*/
|
||||
SimpleEngine.prototype.focus = function() {
|
||||
if(this.domNode.focus && this.domNode.select) {
|
||||
SimpleEngine.prototype.focus = function() {
|
||||
if(this.domNode.focus) {
|
||||
this.domNode.focus();
|
||||
this.domNode.select();
|
||||
}
|
||||
if(this.domNode.select) {
|
||||
$tw.utils.setSelectionByPosition(this.domNode,this.widget.editFocusSelectFromStart,this.widget.editFocusSelectFromEnd);
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -180,6 +180,8 @@ function editTextWidgetFactory(toolbarEngine,nonToolbarEngine) {
|
||||
this.editMinHeight = this.getAttribute("minHeight",DEFAULT_MIN_TEXT_AREA_HEIGHT);
|
||||
this.editFocusPopup = this.getAttribute("focusPopup");
|
||||
this.editFocus = this.getAttribute("focus");
|
||||
this.editFocusSelectFromStart = $tw.utils.parseNumber(this.getAttribute("focusSelectFromStart","0"));
|
||||
this.editFocusSelectFromEnd = $tw.utils.parseNumber(this.getAttribute("focusSelectFromEnd","0"));
|
||||
this.editTabIndex = this.getAttribute("tabindex");
|
||||
this.editCancelPopups = this.getAttribute("cancelPopups","") === "yes";
|
||||
this.editInputActions = this.getAttribute("inputActions");
|
||||
@ -218,7 +220,7 @@ function editTextWidgetFactory(toolbarEngine,nonToolbarEngine) {
|
||||
EditTextWidget.prototype.refresh = function(changedTiddlers) {
|
||||
var changedAttributes = this.computeAttributes();
|
||||
// Completely rerender if any of our attributes have changed
|
||||
if(changedAttributes.tiddler || changedAttributes.field || changedAttributes.index || changedAttributes["default"] || changedAttributes["class"] || changedAttributes.placeholder || changedAttributes.size || changedAttributes.autoHeight || changedAttributes.minHeight || changedAttributes.focusPopup || changedAttributes.rows || changedAttributes.tabindex || changedAttributes.cancelPopups || changedAttributes.inputActions || changedAttributes.refreshTitle || changedAttributes.autocomplete || changedTiddlers[HEIGHT_MODE_TITLE] || changedTiddlers[ENABLE_TOOLBAR_TITLE] || changedAttributes.disabled || changedAttributes.fileDrop) {
|
||||
if(changedAttributes.tiddler || changedAttributes.field || changedAttributes.index || changedAttributes["default"] || changedAttributes["class"] || changedAttributes.placeholder || changedAttributes.size || changedAttributes.autoHeight || changedAttributes.minHeight || changedAttributes.focusPopup || changedAttributes.rows || changedAttributes.tabindex || changedAttributes.cancelPopups || changedAttributes.inputActions || changedAttributes.refreshTitle || changedAttributes.autocomplete || changedTiddlers[HEIGHT_MODE_TITLE] || changedTiddlers[ENABLE_TOOLBAR_TITLE] || changedTiddlers["$:/palette"] || changedAttributes.disabled || changedAttributes.fileDrop) {
|
||||
this.refreshSelf();
|
||||
return true;
|
||||
} else if (changedTiddlers[this.editRefreshTitle]) {
|
||||
|
@ -16,6 +16,22 @@ Filter operator for applying decodeURIComponent() to each item.
|
||||
Export our filter functions
|
||||
*/
|
||||
|
||||
exports.decodebase64 = function(source,operator,options) {
|
||||
var results = [];
|
||||
source(function(tiddler,title) {
|
||||
results.push($tw.utils.base64Decode(title));
|
||||
});
|
||||
return results;
|
||||
};
|
||||
|
||||
exports.encodebase64 = function(source,operator,options) {
|
||||
var results = [];
|
||||
source(function(tiddler,title) {
|
||||
results.push($tw.utils.base64Encode(title));
|
||||
});
|
||||
return results;
|
||||
};
|
||||
|
||||
exports.decodeuricomponent = function(source,operator,options) {
|
||||
var results = [];
|
||||
source(function(tiddler,title) {
|
||||
@ -27,7 +43,7 @@ exports.decodeuricomponent = function(source,operator,options) {
|
||||
exports.encodeuricomponent = function(source,operator,options) {
|
||||
var results = [];
|
||||
source(function(tiddler,title) {
|
||||
results.push(encodeURIComponent(title));
|
||||
results.push($tw.utils.encodeURIComponentExtended(title));
|
||||
});
|
||||
return results;
|
||||
};
|
||||
|
@ -32,18 +32,18 @@ FieldIndexer.prototype.setMaxIndexedValueLength = function(length) {
|
||||
|
||||
FieldIndexer.prototype.addIndexMethods = function() {
|
||||
var self = this;
|
||||
// get all tiddlers, including those overwrite shadow tiddlers
|
||||
this.wiki.each.byField = function(name,value) {
|
||||
var titles = self.wiki.allTitles(),
|
||||
lookup = self.lookup(name,value);
|
||||
var lookup = self.lookup(name,value);
|
||||
return lookup && lookup.filter(function(title) {
|
||||
return titles.indexOf(title) !== -1;
|
||||
return self.wiki.tiddlerExists(title)
|
||||
});
|
||||
};
|
||||
// get shadow tiddlers, including shadow tiddlers that is overwritten
|
||||
this.wiki.eachShadow.byField = function(name,value) {
|
||||
var titles = self.wiki.allShadowTitles(),
|
||||
lookup = self.lookup(name,value);
|
||||
var lookup = self.lookup(name,value);
|
||||
return lookup && lookup.filter(function(title) {
|
||||
return titles.indexOf(title) !== -1;
|
||||
return self.wiki.isShadowTiddler(title)
|
||||
});
|
||||
};
|
||||
this.wiki.eachTiddlerPlusShadows.byField = function(name,value) {
|
||||
|
@ -84,7 +84,8 @@ exports.parseTokenString = function(source,pos,token) {
|
||||
};
|
||||
|
||||
/*
|
||||
Look for a token matching a regex. Returns null if not found, otherwise returns {type: "regexp", match:, start:, end:,}
|
||||
Look for a token matching a regex at a specified position. Returns null if not found, otherwise returns {type: "regexp", match:, start:, end:,}
|
||||
Use the "Y" (sticky) flag to avoid searching the entire rest of the string
|
||||
*/
|
||||
exports.parseTokenRegExp = function(source,pos,reToken) {
|
||||
var node = {
|
||||
@ -145,7 +146,7 @@ exports.parseMacroParameter = function(source,pos) {
|
||||
start: pos
|
||||
};
|
||||
// Define our regexp
|
||||
var reMacroParameter = /(?:([A-Za-z0-9\-_]+)\s*:)?(?:\s*(?:"""([\s\S]*?)"""|"([^"]*)"|'([^']*)'|\[\[([^\]]*)\]\]|((?:(?:>(?!>))|[^\s>"'])+)))/g;
|
||||
var reMacroParameter = /(?:([A-Za-z0-9\-_]+)\s*:)?(?:\s*(?:"""([\s\S]*?)"""|"([^"]*)"|'([^']*)'|\[\[([^\]]*)\]\]|((?:(?:>(?!>))|[^\s>"'])+)))/y;
|
||||
// Skip whitespace
|
||||
pos = $tw.utils.skipWhiteSpace(source,pos);
|
||||
// Look for the parameter
|
||||
@ -184,7 +185,7 @@ exports.parseMacroInvocation = function(source,pos) {
|
||||
params: []
|
||||
};
|
||||
// Define our regexps
|
||||
var reMacroName = /([^\s>"'=]+)/g;
|
||||
var reMacroName = /([^\s>"'=]+)/y;
|
||||
// Skip whitespace
|
||||
pos = $tw.utils.skipWhiteSpace(source,pos);
|
||||
// Look for a double less than sign
|
||||
@ -221,7 +222,7 @@ exports.parseFilterVariable = function(source) {
|
||||
params: [],
|
||||
},
|
||||
pos = 0,
|
||||
reName = /([^\s"']+)/g;
|
||||
reName = /([^\s"']+)/y;
|
||||
// If there is no whitespace or it is an empty string then there are no macro parameters
|
||||
if(/^\S*$/.test(source)) {
|
||||
node.name = source;
|
||||
@ -246,10 +247,10 @@ exports.parseAttribute = function(source,pos) {
|
||||
start: pos
|
||||
};
|
||||
// Define our regexps
|
||||
var reAttributeName = /([^\/\s>"'=]+)/g,
|
||||
reUnquotedAttribute = /([^\/\s<>"'=]+)/g,
|
||||
reFilteredValue = /\{\{\{([\S\s]+?)\}\}\}/g,
|
||||
reIndirectValue = /\{\{([^\}]+)\}\}/g;
|
||||
var reAttributeName = /([^\/\s>"'=]+)/y,
|
||||
reUnquotedAttribute = /([^\/\s<>"'=]+)/y,
|
||||
reFilteredValue = /\{\{\{([\S\s]+?)\}\}\}/y,
|
||||
reIndirectValue = /\{\{([^\}]+)\}\}/y;
|
||||
// Skip whitespace
|
||||
pos = $tw.utils.skipWhiteSpace(source,pos);
|
||||
// Get the attribute name
|
||||
|
@ -15,7 +15,7 @@ The PDF parser embeds a PDF viewer
|
||||
var ImageParser = function(type,text,options) {
|
||||
var element = {
|
||||
type: "element",
|
||||
tag: "embed",
|
||||
tag: "iframe",
|
||||
attributes: {}
|
||||
},
|
||||
src;
|
||||
|
@ -48,7 +48,7 @@ exports.parse = function() {
|
||||
// Advance the parser position to past the tag
|
||||
this.parser.pos = tag.end;
|
||||
// Check for an immediately following double linebreak
|
||||
var hasLineBreak = !tag.isSelfClosing && !!$tw.utils.parseTokenRegExp(this.parser.source,this.parser.pos,/([^\S\n\r]*\r?\n(?:[^\S\n\r]*\r?\n|$))/g);
|
||||
var hasLineBreak = !tag.isSelfClosing && !!$tw.utils.parseTokenRegExp(this.parser.source,this.parser.pos,/([^\S\n\r]*\r?\n(?:[^\S\n\r]*\r?\n|$))/y);
|
||||
// Set whether we're in block mode
|
||||
tag.isBlock = this.is.block || hasLineBreak;
|
||||
// Parse the body if we need to
|
||||
@ -78,7 +78,7 @@ exports.parseTag = function(source,pos,options) {
|
||||
orderedAttributes: []
|
||||
};
|
||||
// Define our regexps
|
||||
var reTagName = /([a-zA-Z0-9\-\$]+)/g;
|
||||
var reTagName = /([a-zA-Z0-9\-\$]+)/y;
|
||||
// Skip whitespace
|
||||
pos = $tw.utils.skipWhiteSpace(source,pos);
|
||||
// Look for a less than sign
|
||||
@ -129,7 +129,7 @@ exports.parseTag = function(source,pos,options) {
|
||||
pos = token.end;
|
||||
// Check for a required line break
|
||||
if(options.requireLineBreak) {
|
||||
token = $tw.utils.parseTokenRegExp(source,pos,/([^\S\n\r]*\r?\n(?:[^\S\n\r]*\r?\n|$))/g);
|
||||
token = $tw.utils.parseTokenRegExp(source,pos,/([^\S\n\r]*\r?\n(?:[^\S\n\r]*\r?\n|$))/y);
|
||||
if(!token) {
|
||||
return null;
|
||||
}
|
||||
|
@ -116,7 +116,7 @@ exports.parseImage = function(source,pos) {
|
||||
// Skip whitespace
|
||||
pos = $tw.utils.skipWhiteSpace(source,pos);
|
||||
// Get the source up to the terminating `]]`
|
||||
token = $tw.utils.parseTokenRegExp(source,pos,/(?:([^|\]]*?)\|)?([^\]]+?)\]\]/g);
|
||||
token = $tw.utils.parseTokenRegExp(source,pos,/(?:([^|\]]*?)\|)?([^\]]+?)\]\]/y);
|
||||
if(!token) {
|
||||
return null;
|
||||
}
|
||||
|
@ -25,7 +25,7 @@ Instantiate parse rule
|
||||
exports.init = function(parser) {
|
||||
this.parser = parser;
|
||||
// Regexp to match
|
||||
this.matchRegExp = /^\\import[^\S\n]/mg;
|
||||
this.matchRegExp = /\\import[^\S\n]/mg;
|
||||
};
|
||||
|
||||
/*
|
||||
|
@ -27,7 +27,7 @@ Instantiate parse rule
|
||||
exports.init = function(parser) {
|
||||
this.parser = parser;
|
||||
// Regexp to match
|
||||
this.matchRegExp = /^\\define\s+([^(\s]+)\(\s*([^)]*)\)(\s*\r?\n)?/mg;
|
||||
this.matchRegExp = /\\define\s+([^(\s]+)\(\s*([^)]*)\)(\s*\r?\n)?/mg;
|
||||
};
|
||||
|
||||
/*
|
||||
@ -58,7 +58,7 @@ exports.parse = function() {
|
||||
var reEnd;
|
||||
if(this.match[3]) {
|
||||
// If so, the end of the body is marked with \end
|
||||
reEnd = new RegExp("(\\r?\\n\\\\end[^\\S\\n\\r]*(?:" + $tw.utils.escapeRegExp(this.match[1]) + ")?(?:$|\\r?\\n))","mg");
|
||||
reEnd = new RegExp("(\\r?\\n\\s*\\\\end[^\\S\\n\\r]*(?:" + $tw.utils.escapeRegExp(this.match[1]) + ")?(?:$|\\r?\\n))","mg");
|
||||
} else {
|
||||
// Otherwise, the end of the definition is marked by the end of the line
|
||||
reEnd = /($|\r?\n)/mg;
|
||||
|
@ -26,7 +26,7 @@ Instantiate parse rule
|
||||
exports.init = function(parser) {
|
||||
this.parser = parser;
|
||||
// Regexp to match
|
||||
this.matchRegExp = /^\\parsermode[^\S\n]/mg;
|
||||
this.matchRegExp = /\\parsermode[^\S\n]/mg;
|
||||
};
|
||||
|
||||
/*
|
||||
|
@ -26,7 +26,7 @@ Instantiate parse rule
|
||||
exports.init = function(parser) {
|
||||
this.parser = parser;
|
||||
// Regexp to match
|
||||
this.matchRegExp = /^\\rules[^\S\n]/mg;
|
||||
this.matchRegExp = /\\rules[^\S\n]/mg;
|
||||
};
|
||||
|
||||
/*
|
||||
|
@ -26,7 +26,7 @@ Instantiate parse rule
|
||||
exports.init = function(parser) {
|
||||
this.parser = parser;
|
||||
// Regexp to match
|
||||
this.matchRegExp = /^\\whitespace[^\S\n]/mg;
|
||||
this.matchRegExp = /\\whitespace[^\S\n]/mg;
|
||||
};
|
||||
|
||||
/*
|
||||
|
@ -1,64 +0,0 @@
|
||||
/*\
|
||||
title: $:/core/modules/savers/beaker.js
|
||||
type: application/javascript
|
||||
module-type: saver
|
||||
|
||||
Saves files using the Beaker browser's (https://beakerbrowser.com) Dat protocol (https://datproject.org/)
|
||||
Compatible with beaker >= V0.7.2
|
||||
|
||||
\*/
|
||||
(function(){
|
||||
|
||||
/*jslint node: true, browser: true */
|
||||
/*global $tw: false */
|
||||
"use strict";
|
||||
|
||||
/*
|
||||
Set up the saver
|
||||
*/
|
||||
var BeakerSaver = function(wiki) {
|
||||
this.wiki = wiki;
|
||||
};
|
||||
|
||||
BeakerSaver.prototype.save = function(text,method,callback) {
|
||||
var dat = new DatArchive("" + window.location),
|
||||
pathname = ("" + window.location.pathname).split("#")[0];
|
||||
dat.stat(pathname).then(function(value) {
|
||||
if(value.isDirectory()) {
|
||||
pathname = pathname + "/index.html";
|
||||
}
|
||||
dat.writeFile(pathname,text,"utf8").then(function(value) {
|
||||
callback(null);
|
||||
},function(reason) {
|
||||
callback("Beaker Saver Write Error: " + reason);
|
||||
});
|
||||
},function(reason) {
|
||||
callback("Beaker Saver Stat Error: " + reason);
|
||||
});
|
||||
return true;
|
||||
};
|
||||
|
||||
/*
|
||||
Information about this saver
|
||||
*/
|
||||
BeakerSaver.prototype.info = {
|
||||
name: "beaker",
|
||||
priority: 3000,
|
||||
capabilities: ["save", "autosave"]
|
||||
};
|
||||
|
||||
/*
|
||||
Static method that returns true if this saver is capable of working
|
||||
*/
|
||||
exports.canSave = function(wiki) {
|
||||
return !!window.DatArchive && location.protocol==="dat:";
|
||||
};
|
||||
|
||||
/*
|
||||
Create an instance of this saver
|
||||
*/
|
||||
exports.create = function(wiki) {
|
||||
return new BeakerSaver(wiki);
|
||||
};
|
||||
|
||||
})();
|
@ -1,64 +0,0 @@
|
||||
/*\
|
||||
title: $:/core/modules/savers/hyperdrive.js
|
||||
type: application/javascript
|
||||
module-type: saver
|
||||
|
||||
Saves files using the Hyperdrive Protocol (https://hypercore-protocol.org/#hyperdrive) Beaker browser beta-1.0 and later (https://beakerbrowser.com)
|
||||
Compatible with beaker >= V1.0.0
|
||||
|
||||
\*/
|
||||
(function(){
|
||||
|
||||
/*jslint node: true, browser: true */
|
||||
/*global $tw: false */
|
||||
"use strict";
|
||||
|
||||
/*
|
||||
Set up the saver
|
||||
*/
|
||||
var HyperdriveSaver = function(wiki) {
|
||||
this.wiki = wiki;
|
||||
};
|
||||
|
||||
HyperdriveSaver.prototype.save = function(text,method,callback) {
|
||||
var dat = beaker.hyperdrive.drive("" + window.location),
|
||||
pathname = ("" + window.location.pathname).split("#")[0];
|
||||
dat.stat(pathname).then(function(value) {
|
||||
if(value.isDirectory()) {
|
||||
pathname = pathname + "/index.html";
|
||||
}
|
||||
dat.writeFile(pathname,text,"utf8").then(function(value) {
|
||||
callback(null);
|
||||
},function(reason) {
|
||||
callback("Hyperdrive Saver Write Error: " + reason);
|
||||
});
|
||||
},function(reason) {
|
||||
callback("Hyperdrive Saver Stat Error: " + reason);
|
||||
});
|
||||
return true;
|
||||
};
|
||||
|
||||
/*
|
||||
Information about this saver
|
||||
*/
|
||||
HyperdriveSaver.prototype.info = {
|
||||
name: "beaker-1.x",
|
||||
priority: 3000,
|
||||
capabilities: ["save", "autosave"]
|
||||
};
|
||||
|
||||
/*
|
||||
Static method that returns true if this saver is capable of working
|
||||
*/
|
||||
exports.canSave = function(wiki) {
|
||||
return !!window.beaker && !!beaker.hyperdrive && location.protocol==="hyper:";
|
||||
};
|
||||
|
||||
/*
|
||||
Create an instance of this saver
|
||||
*/
|
||||
exports.create = function(wiki) {
|
||||
return new HyperdriveSaver(wiki);
|
||||
};
|
||||
|
||||
})();
|
@ -87,13 +87,6 @@ exports.startup = function() {
|
||||
}
|
||||
});
|
||||
}
|
||||
// If we're being viewed on a data: URI then give instructions for how to save
|
||||
if(document.location.protocol === "data:") {
|
||||
$tw.rootWidget.dispatchEvent({
|
||||
type: "tm-modal",
|
||||
param: "$:/language/Modals/SaveInstructions"
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
})();
|
||||
|
@ -17,6 +17,10 @@ var easing = "cubic-bezier(0.645, 0.045, 0.355, 1)"; // From http://easings.net/
|
||||
var ZoominListView = function(listWidget) {
|
||||
var self = this;
|
||||
this.listWidget = listWidget;
|
||||
this.textNodeLogger = new $tw.utils.Logger("zoomin story river view", {
|
||||
enable: true,
|
||||
colour: 'red'
|
||||
});
|
||||
// Get the index of the tiddler that is at the top of the history
|
||||
var history = this.listWidget.wiki.getTiddlerDataCached(this.listWidget.historyTitle,[]),
|
||||
targetTiddler;
|
||||
@ -48,7 +52,10 @@ ZoominListView.prototype.navigateTo = function(historyInfo) {
|
||||
var listItemWidget = this.listWidget.children[listElementIndex],
|
||||
targetElement = listItemWidget.findFirstDomNode();
|
||||
// Abandon if the list entry isn't a DOM element (it might be a text node)
|
||||
if(!targetElement || targetElement.nodeType === Node.TEXT_NODE) {
|
||||
if(!targetElement) {
|
||||
return;
|
||||
} else if (targetElement.nodeType === Node.TEXT_NODE) {
|
||||
this.logTextNodeRoot(targetElement);
|
||||
return;
|
||||
}
|
||||
// Make the new tiddler be position absolute and visible so that we can measure it
|
||||
@ -130,7 +137,10 @@ function findTitleDomNode(widget,targetClass) {
|
||||
ZoominListView.prototype.insert = function(widget) {
|
||||
var targetElement = widget.findFirstDomNode();
|
||||
// Abandon if the list entry isn't a DOM element (it might be a text node)
|
||||
if(!targetElement || targetElement.nodeType === Node.TEXT_NODE) {
|
||||
if(!targetElement) {
|
||||
return;
|
||||
} else if (targetElement.nodeType === Node.TEXT_NODE) {
|
||||
this.logTextNodeRoot(targetElement);
|
||||
return;
|
||||
}
|
||||
// Make the newly inserted node position absolute and hidden
|
||||
@ -173,16 +183,21 @@ ZoominListView.prototype.remove = function(widget) {
|
||||
var toWidgetDomNode = toWidget && toWidget.findFirstDomNode();
|
||||
// Set up the tiddler we're moving back in
|
||||
if(toWidgetDomNode) {
|
||||
$tw.utils.addClass(toWidgetDomNode,"tc-storyview-zoomin-tiddler");
|
||||
$tw.utils.setStyle(toWidgetDomNode,[
|
||||
{display: "block"},
|
||||
{transformOrigin: "50% 50%"},
|
||||
{transform: "translateX(0px) translateY(0px) scale(10)"},
|
||||
{transition: $tw.utils.roundTripPropertyName("transform") + " " + duration + "ms " + easing + ", opacity " + duration + "ms " + easing},
|
||||
{opacity: "0"},
|
||||
{zIndex: "500"}
|
||||
]);
|
||||
this.currentTiddlerDomNode = toWidgetDomNode;
|
||||
if (toWidgetDomNode.nodeType === Node.TEXT_NODE) {
|
||||
this.logTextNodeRoot(toWidgetDomNode);
|
||||
toWidgetDomNode = null;
|
||||
} else {
|
||||
$tw.utils.addClass(toWidgetDomNode,"tc-storyview-zoomin-tiddler");
|
||||
$tw.utils.setStyle(toWidgetDomNode,[
|
||||
{display: "block"},
|
||||
{transformOrigin: "50% 50%"},
|
||||
{transform: "translateX(0px) translateY(0px) scale(10)"},
|
||||
{transition: $tw.utils.roundTripPropertyName("transform") + " " + duration + "ms " + easing + ", opacity " + duration + "ms " + easing},
|
||||
{opacity: "0"},
|
||||
{zIndex: "500"}
|
||||
]);
|
||||
this.currentTiddlerDomNode = toWidgetDomNode;
|
||||
}
|
||||
}
|
||||
// Animate them both
|
||||
// Force layout
|
||||
@ -206,6 +221,10 @@ ZoominListView.prototype.remove = function(widget) {
|
||||
return true; // Indicate that we'll delete the DOM node
|
||||
};
|
||||
|
||||
ZoominListView.prototype.logTextNodeRoot = function(node) {
|
||||
this.textNodeLogger.log($tw.language.getString("Error/ZoominTextNode") + " " + node.textContent);
|
||||
};
|
||||
|
||||
exports.zoomin = ZoominListView;
|
||||
|
||||
})();
|
||||
|
@ -28,6 +28,24 @@ exports.domMatchesSelector = function(node,selector) {
|
||||
return node.matches ? node.matches(selector) : node.msMatchesSelector(selector);
|
||||
};
|
||||
|
||||
/*
|
||||
Select text in a an input or textarea (setSelectionRange crashes on certain input types)
|
||||
*/
|
||||
exports.setSelectionRangeSafe = function(node,start,end,direction) {
|
||||
try {
|
||||
node.setSelectionRange(start,end,direction);
|
||||
} catch(e) {
|
||||
node.select();
|
||||
}
|
||||
};
|
||||
|
||||
/*
|
||||
Select the text in an input or textarea by position
|
||||
*/
|
||||
exports.setSelectionByPosition = function(node,selectFromStart,selectFromEnd) {
|
||||
$tw.utils.setSelectionRangeSafe(node,selectFromStart,node.value.length - selectFromEnd);
|
||||
};
|
||||
|
||||
exports.removeChildren = function(node) {
|
||||
while(node.hasChildNodes()) {
|
||||
node.removeChild(node.firstChild);
|
||||
|
@ -228,7 +228,7 @@ exports.generateTiddlerFileInfo = function(tiddler,options) {
|
||||
hasUnsafeFields = hasUnsafeFields || /[\x00-\x1F]/mg.test(value);
|
||||
hasUnsafeFields = hasUnsafeFields || ($tw.utils.trim(value) !== value);
|
||||
}
|
||||
hasUnsafeFields = hasUnsafeFields || /:/mg.test(fieldName);
|
||||
hasUnsafeFields = hasUnsafeFields || /:|#/mg.test(fieldName);
|
||||
});
|
||||
// Check for field values
|
||||
if(hasUnsafeFields) {
|
||||
@ -238,7 +238,7 @@ exports.generateTiddlerFileInfo = function(tiddler,options) {
|
||||
} else {
|
||||
// Save as a .tid or a text/binary file plus a .meta file
|
||||
var tiddlerType = tiddler.fields.type || "text/vnd.tiddlywiki";
|
||||
if(tiddlerType === "text/vnd.tiddlywiki") {
|
||||
if(tiddlerType === "text/vnd.tiddlywiki" || tiddler.hasField("_canonical_uri")) {
|
||||
// Save as a .tid file
|
||||
fileInfo.type = "application/x-tiddler";
|
||||
fileInfo.hasMetaFile = false;
|
||||
@ -393,7 +393,7 @@ exports.generateTiddlerFilepath = function(title,options) {
|
||||
} while(fs.existsSync(fullPath));
|
||||
// If the last write failed with an error, or if path does not start with:
|
||||
// the resolved options.directory, the resolved wikiPath directory, the wikiTiddlersPath directory,
|
||||
// or the 'originalpath' directory, then encodeURIComponent() and resolve to tiddler directory.
|
||||
// or the 'originalpath' directory, then $tw.utils.encodeURIComponentExtended() and resolve to tiddler directory.
|
||||
var writePath = $tw.hooks.invokeHook("th-make-tiddler-path",fullPath,fullPath),
|
||||
encode = (options.fileInfo || {writeError: false}).writeError == true;
|
||||
if(!encode) {
|
||||
@ -403,7 +403,7 @@ exports.generateTiddlerFilepath = function(title,options) {
|
||||
writePath.indexOf(path.resolve($tw.boot.wikiTiddlersPath,originalpath)) == 0 );
|
||||
}
|
||||
if(encode) {
|
||||
writePath = path.resolve(directory,encodeURIComponent(fullPath));
|
||||
writePath = path.resolve(directory,$tw.utils.encodeURIComponentExtended(fullPath));
|
||||
}
|
||||
// Return the full path to the file
|
||||
return writePath;
|
||||
|
@ -685,6 +685,16 @@ exports.escapeRegExp = function(s) {
|
||||
return s.replace(/[\-\/\\\^\$\*\+\?\.\(\)\|\[\]\{\}]/g, '\\$&');
|
||||
};
|
||||
|
||||
/*
|
||||
Extended version of encodeURIComponent that encodes additional characters including
|
||||
those that are illegal within filepaths on various platforms including Windows
|
||||
*/
|
||||
exports.encodeURIComponentExtended = function(s) {
|
||||
return encodeURIComponent(s).replace(/[!'()*]/g,function(c) {
|
||||
return "%" + c.charCodeAt(0).toString(16).toUpperCase();
|
||||
});
|
||||
};
|
||||
|
||||
// Checks whether a link target is external, i.e. not a tiddler title
|
||||
exports.isLinkExternal = function(to) {
|
||||
var externalRegExp = /^(?:file|http|https|mailto|ftp|irc|news|obsidian|data|skype):[^\s<>{}\[\]`|"\\^]+(?:\/|\b)/i;
|
||||
|
@ -232,12 +232,34 @@ DropZoneWidget.prototype.handleDropEvent = function(event) {
|
||||
};
|
||||
|
||||
DropZoneWidget.prototype.handlePasteEvent = function(event) {
|
||||
var self = this,
|
||||
readFileCallback = function(tiddlerFieldsArray) {
|
||||
var self = this;
|
||||
var readFileCallback = function(tiddlerFieldsArray) {
|
||||
self.readFileCallback(tiddlerFieldsArray);
|
||||
};
|
||||
var getItem = function(type) {
|
||||
type = type || "text/plain";
|
||||
return function(str) {
|
||||
// Use the deserializer specified if any
|
||||
if(self.dropzoneDeserializer) {
|
||||
tiddlerFields = self.wiki.deserializeTiddlers(null,str,{title: self.wiki.generateNewTitle("Untitled " + type)},{deserializer:self.dropzoneDeserializer});
|
||||
if(tiddlerFields && tiddlerFields.length) {
|
||||
readFileCallback(tiddlerFields);
|
||||
}
|
||||
} else {
|
||||
tiddlerFields = {
|
||||
title: self.wiki.generateNewTitle("Untitled " + type),
|
||||
text: str,
|
||||
type: type
|
||||
};
|
||||
if($tw.log.IMPORT) {
|
||||
console.log("Importing string '" + str + "', type: '" + type + "'");
|
||||
}
|
||||
readFileCallback([tiddlerFields]);
|
||||
}
|
||||
}
|
||||
};
|
||||
// Let the browser handle it if we're in a textarea or input box
|
||||
if(["TEXTAREA","INPUT"].indexOf(event.target.tagName) == -1 && !event.target.isContentEditable) {
|
||||
if(["TEXTAREA","INPUT"].indexOf(event.target.tagName) == -1 && !event.target.isContentEditable && !event.twEditor) {
|
||||
var self = this,
|
||||
items = event.clipboardData.items;
|
||||
// Enumerate the clipboard items
|
||||
@ -251,27 +273,10 @@ DropZoneWidget.prototype.handlePasteEvent = function(event) {
|
||||
});
|
||||
} else if(item.kind === "string") {
|
||||
// Create tiddlers from string items
|
||||
var tiddlerFields,
|
||||
type = item.type;
|
||||
item.getAsString(function(str) {
|
||||
// Use the deserializer specified if any
|
||||
if(self.dropzoneDeserializer) {
|
||||
tiddlerFields = self.wiki.deserializeTiddlers(null,str,{title: self.wiki.generateNewTitle("Untitled")},{deserializer:self.dropzoneDeserializer});
|
||||
if(tiddlerFields && tiddlerFields.length) {
|
||||
readFileCallback(tiddlerFields);
|
||||
}
|
||||
} else {
|
||||
tiddlerFields = {
|
||||
title: self.wiki.generateNewTitle("Untitled"),
|
||||
text: str,
|
||||
type: type
|
||||
};
|
||||
if($tw.log.IMPORT) {
|
||||
console.log("Importing string '" + str + "', type: '" + type + "'");
|
||||
}
|
||||
readFileCallback([tiddlerFields]);
|
||||
}
|
||||
});
|
||||
var tiddlerFields;
|
||||
// It's important to give getAsString a closure with the right type
|
||||
// So it can be added to the import queue
|
||||
item.getAsString(getItem(item.type));
|
||||
}
|
||||
}
|
||||
// Tell the browser that we've handled the paste
|
||||
|
@ -46,6 +46,7 @@ GenesisWidget.prototype.execute = function() {
|
||||
this.genesisRemappable = this.getAttribute("$remappable","yes") === "yes";
|
||||
this.genesisNames = this.getAttribute("$names","");
|
||||
this.genesisValues = this.getAttribute("$values","");
|
||||
this.genesisIsBlock = this.getAttribute("$mode",this.parseTreeNode.isBlock && "block") === "block";
|
||||
// Do not create a child widget if the $type attribute is missing or blank
|
||||
if(!this.genesisType) {
|
||||
this.makeChildWidgets(this.parseTreeNode.children);
|
||||
@ -60,6 +61,7 @@ GenesisWidget.prototype.execute = function() {
|
||||
tag: nodeTag,
|
||||
attributes: {},
|
||||
orderedAttributes: [],
|
||||
isBlock: this.genesisIsBlock,
|
||||
children: this.parseTreeNode.children || [],
|
||||
isNotRemappable: !this.genesisRemappable
|
||||
}];
|
||||
|
@ -74,7 +74,9 @@ LetWidget.prototype.getVariableInfo = function(name,options) {
|
||||
text: this.currentValueFor[name]
|
||||
};
|
||||
}
|
||||
return Widget.prototype.getVariableInfo.call(this,name,options);
|
||||
return Widget.prototype.getVariableInfo.call(this,name,$tw.utils.extend(Object.create(null),options,{
|
||||
defaultValue: ""
|
||||
}));
|
||||
};
|
||||
|
||||
/*
|
||||
|
@ -97,8 +97,8 @@ LinkWidget.prototype.renderLink = function(parent,nextSibling) {
|
||||
// Expand the tv-wikilink-template variable to construct the href
|
||||
var wikiLinkTemplateMacro = this.getVariable("tv-wikilink-template"),
|
||||
wikiLinkTemplate = wikiLinkTemplateMacro ? wikiLinkTemplateMacro.trim() : "#$uri_encoded$";
|
||||
wikiLinkText = $tw.utils.replaceString(wikiLinkTemplate,"$uri_encoded$",encodeURIComponent(this.to));
|
||||
wikiLinkText = $tw.utils.replaceString(wikiLinkText,"$uri_doubleencoded$",encodeURIComponent(encodeURIComponent(this.to)));
|
||||
wikiLinkText = $tw.utils.replaceString(wikiLinkTemplate,"$uri_encoded$",$tw.utils.encodeURIComponentExtended(this.to));
|
||||
wikiLinkText = $tw.utils.replaceString(wikiLinkText,"$uri_doubleencoded$",$tw.utils.encodeURIComponentExtended($tw.utils.encodeURIComponentExtended(this.to)));
|
||||
}
|
||||
// Override with the value of tv-get-export-link if defined
|
||||
wikiLinkText = this.getVariable("tv-get-export-link",{params: [{name: "to",value: this.to}],defaultValue: wikiLinkText});
|
||||
|
@ -82,7 +82,7 @@ MessageCatcherWidget.prototype.render = function(parent,nextSibling) {
|
||||
}
|
||||
});
|
||||
// Render children
|
||||
this.renderChildren(parent,null);
|
||||
this.renderChildren(parent,nextSibling);
|
||||
};
|
||||
|
||||
/*
|
||||
|
@ -227,10 +227,7 @@ NavigatorWidget.prototype.handleDeleteTiddlerEvent = function(event) {
|
||||
originalTitle = tiddler ? tiddler.fields["draft.of"] : "",
|
||||
originalTiddler = originalTitle ? this.wiki.getTiddler(originalTitle) : undefined,
|
||||
confirmationTitle,
|
||||
win = event.event && event.event.view ? event.event.view : window;
|
||||
if(!tiddler) {
|
||||
return false;
|
||||
}
|
||||
win = event.event && event.event.view ? event.event.view : window;
|
||||
// Check if the tiddler we're deleting is in draft mode
|
||||
if(originalTitle) {
|
||||
// If so, we'll prompt for confirmation referencing the original tiddler
|
||||
@ -240,7 +237,7 @@ NavigatorWidget.prototype.handleDeleteTiddlerEvent = function(event) {
|
||||
confirmationTitle = title;
|
||||
}
|
||||
// Seek confirmation
|
||||
if((this.wiki.getTiddler(originalTitle) || (tiddler.fields.text || "") !== "") && !win.confirm($tw.language.getString(
|
||||
if(((originalTitle && this.wiki.getTiddler(originalTitle)) || (tiddler && ((tiddler.fields.text || "") !== ""))) && !win.confirm($tw.language.getString(
|
||||
"ConfirmDeleteTiddler",
|
||||
{variables:
|
||||
{title: confirmationTitle}
|
||||
@ -257,8 +254,10 @@ NavigatorWidget.prototype.handleDeleteTiddlerEvent = function(event) {
|
||||
this.removeTitleFromStory(storyList,originalTitle);
|
||||
}
|
||||
// Invoke the hook function and delete this tiddler
|
||||
$tw.hooks.invokeHook("th-deleting-tiddler",tiddler);
|
||||
this.wiki.deleteTiddler(title);
|
||||
if(tiddler) {
|
||||
$tw.hooks.invokeHook("th-deleting-tiddler",tiddler);
|
||||
this.wiki.deleteTiddler(title);
|
||||
}
|
||||
// Remove the closed tiddler from the story
|
||||
this.removeTitleFromStory(storyList,title);
|
||||
this.saveStoryList(storyList);
|
||||
@ -500,7 +499,8 @@ NavigatorWidget.prototype.handleImportTiddlersEvent = function(event) {
|
||||
// Get the tiddlers
|
||||
var tiddlers = $tw.utils.parseJSONSafe(event.param,[]);
|
||||
// Get the current $:/Import tiddler
|
||||
var importTitle = event.importTitle ? event.importTitle : IMPORT_TITLE,
|
||||
var paramObject = event.paramObject || {},
|
||||
importTitle = event.importTitle || paramObject.importTitle || IMPORT_TITLE,
|
||||
importTiddler = this.wiki.getTiddler(importTitle),
|
||||
importData = this.wiki.getTiddlerData(importTitle,{}),
|
||||
newFields = new Object({
|
||||
@ -541,7 +541,7 @@ NavigatorWidget.prototype.handleImportTiddlersEvent = function(event) {
|
||||
newFields.text = JSON.stringify(importData,null,$tw.config.preferences.jsonSpaces);
|
||||
this.wiki.addTiddler(new $tw.Tiddler(importTiddler,newFields));
|
||||
// Update the story and history details
|
||||
var autoOpenOnImport = event.autoOpenOnImport ? event.autoOpenOnImport : this.getVariable("tv-auto-open-on-import");
|
||||
var autoOpenOnImport = event.autoOpenOnImport || paramObject.autoOpenOnImport || this.getVariable("tv-auto-open-on-import");
|
||||
if(autoOpenOnImport !== "no") {
|
||||
var storyList = this.getStoryList(),
|
||||
history = [];
|
||||
|
@ -168,11 +168,11 @@ ViewWidget.prototype.getValueAsHtmlTextEncoded = function() {
|
||||
};
|
||||
|
||||
ViewWidget.prototype.getValueAsUrlEncoded = function() {
|
||||
return encodeURIComponent(this.getValueAsText());
|
||||
return $tw.utils.encodeURIComponentExtended(this.getValueAsText());
|
||||
};
|
||||
|
||||
ViewWidget.prototype.getValueAsDoubleUrlEncoded = function() {
|
||||
return encodeURIComponent(encodeURIComponent(this.getValueAsText()));
|
||||
return $tw.utils.encodeURIComponentExtended($tw.utils.encodeURIComponentExtended(this.getValueAsText()));
|
||||
};
|
||||
|
||||
ViewWidget.prototype.getValueAsDate = function(format) {
|
||||
|
@ -14,6 +14,7 @@ extension: .html
|
||||
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
|
||||
<meta name="generator" content="TiddlyWiki" />
|
||||
<meta name="tiddlywiki-version" content="{{$:/core/templates/version}}" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<meta name="format-detection" content="telephone=no">
|
||||
<link id="faviconLink" rel="shortcut icon" href="favicon.ico">
|
||||
<title>{{$:/core/wiki/title}}</title>
|
||||
|
@ -1,5 +1,6 @@
|
||||
title: $:/core/save/all-external-js
|
||||
|
||||
\whitespace trim
|
||||
\import [[$:/core/ui/PageMacros]] [all[shadows+tiddlers]tag[$:/tags/Macro]!has[draft.of]]
|
||||
\define saveTiddlerFilter()
|
||||
[is[tiddler]] -[prefix[$:/state/popup/]] -[prefix[$:/temp/]] -[prefix[$:/HistoryList]] -[status[pending]plugin-type[import]] -[[$:/core]] -[[$:/boot/boot.css]] -[type[application/javascript]library[yes]] -[[$:/boot/boot.js]] -[[$:/boot/bootprefix.js]] +[sort[title]] $(publishFilter)$
|
||||
|
@ -1,5 +1,6 @@
|
||||
title: $:/core/save/offline-external-js
|
||||
|
||||
\whitespace trim
|
||||
\import [[$:/core/ui/PageMacros]] [all[shadows+tiddlers]tag[$:/tags/Macro]!has[draft.of]]
|
||||
\define saveTiddlerFilter()
|
||||
[is[tiddler]] -[prefix[$:/state/popup/]] -[prefix[$:/temp/]] -[prefix[$:/HistoryList]] -[status[pending]plugin-type[import]] -[[$:/core]] -[[$:/plugins/tiddlywiki/filesystem]] -[[$:/plugins/tiddlywiki/tiddlyweb]] -[[$:/boot/boot.css]] -[type[application/javascript]library[yes]] -[[$:/boot/boot.js]] -[[$:/boot/bootprefix.js]] +[sort[title]] $(publishFilter)$
|
||||
|
3
core/templates/external-js/tiddlywiki.js.load.tid
Normal file
3
core/templates/external-js/tiddlywiki.js.load.tid
Normal file
@ -0,0 +1,3 @@
|
||||
title: $:/core/templates/tiddlywiki.js/load-tiddler
|
||||
|
||||
_load(window,<$macrocall $name="jsontiddler" $output="text/raw"/>);
|
@ -1,15 +1,48 @@
|
||||
|
||||
title: $:/core/templates/tiddlywiki5.js
|
||||
|
||||
\rules only filteredtranscludeinline transcludeinline codeinline
|
||||
|
||||
/*
|
||||
{{ $:/core/copyright.txt ||$:/core/templates/plain-text-tiddler}}
|
||||
`*/
|
||||
`<!--~~ Library modules ~~-->
|
||||
{{{ [is[system]type[application/javascript]library[yes]] ||$:/core/templates/plain-text-tiddler}}}
|
||||
<!--~~ Boot prefix ~~-->
|
||||
{{ $:/boot/bootprefix.js ||$:/core/templates/plain-text-tiddler}}
|
||||
<!--~~ Core plugin ~~-->
|
||||
{{$:/core/templates/tiddlywiki5.js/tiddlers}}
|
||||
<!--~~ Boot kernel ~~-->
|
||||
{{ $:/boot/boot.js ||$:/core/templates/plain-text-tiddler}}
|
||||
`/*
|
||||
`{{ $:/core/copyright.txt ||$:/core/templates/plain-text-tiddler}}`
|
||||
*/
|
||||
|
||||
$tw = (typeof $tw === 'undefined') ? Object.create(null) : $tw;
|
||||
|
||||
$tw.preloadTiddlers = $tw.preloadTiddlers || [];
|
||||
|
||||
_load = function(window,tiddler) {
|
||||
"use strict";
|
||||
var f;
|
||||
$tw.preloadTiddlers.push(tiddler);
|
||||
if(tiddler.library === "yes") {
|
||||
var module = { exports:{} };
|
||||
var moduleName = function moduleName(path) {
|
||||
var word = path.split("/").pop();
|
||||
word = word.substring(0,word.indexOf(".")) || word;
|
||||
return word;
|
||||
}
|
||||
f = new Function("module",tiddler.text);
|
||||
f(module);
|
||||
window[moduleName(tiddler.title)] = module.exports;
|
||||
} else {
|
||||
f = new Function("window",tiddler.text);
|
||||
f(window);
|
||||
}
|
||||
}
|
||||
|
||||
/* ~~ Library modules ~~ */
|
||||
|
||||
`{{{ [is[system]type[application/javascript]library[yes]] ||$:/core/templates/tiddlywiki.js/load-tiddler}}}`
|
||||
|
||||
/* ~~ Boot kernel prologue ~~ */
|
||||
|
||||
`{{ $:/boot/bootprefix.js ||$:/core/templates/tiddlywiki.js/load-tiddler}}`
|
||||
|
||||
/* ~~ Core tiddlers ~~ */
|
||||
|
||||
`{{$:/core/templates/tiddlywiki5.js/tiddlers}}`
|
||||
|
||||
/* ~~ Boot kernel ~~ */
|
||||
|
||||
`{{ $:/boot/boot.js ||$:/core/templates/tiddlywiki.js/load-tiddler}}`
|
||||
|
@ -1,48 +1,50 @@
|
||||
title: $:/core/templates/tiddlywiki5-external-js.html
|
||||
|
||||
\rules only filteredtranscludeinline transcludeinline
|
||||
<!doctype html>
|
||||
{{$:/core/templates/MOTW.html}}<html lang="{{{ [{$:/language}get[name]] }}}">
|
||||
<$set name="saveTiddlerAndShadowsFilter" filter="[subfilter<saveTiddlerFilter>] [subfilter<saveTiddlerFilter>plugintiddlers[]]">
|
||||
`<!doctype html>
|
||||
`{{$:/core/templates/MOTW.html}}`<html lang="`<$text text={{{ [{$:/language}get[name]] }}}/>`">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
|
||||
<!--~~ Raw markup for the top of the head section ~~-->
|
||||
{{{ [all[shadows+tiddlers]tag[$:/tags/RawMarkupWikified/TopHead]] ||$:/core/templates/raw-static-tiddler}}}
|
||||
`{{{ [enlist<saveTiddlerAndShadowsFilter>tag[$:/tags/RawMarkupWikified/TopHead]] ||$:/core/templates/raw-static-tiddler}}}`
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=Edge"/>
|
||||
<meta name="application-name" content="TiddlyWiki" />
|
||||
<meta name="generator" content="TiddlyWiki" />
|
||||
<meta name="tiddlywiki-version" content="{{$:/core/templates/version}}" />
|
||||
<meta name="tiddlywiki-version" content="`{{$:/core/templates/version}}`" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<meta name="apple-mobile-web-app-capable" content="yes" />
|
||||
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent" />
|
||||
<meta name="mobile-web-app-capable" content="yes"/>
|
||||
<meta name="format-detection" content="telephone=no" />
|
||||
<meta name="copyright" content="{{$:/core/copyright.txt}}" />
|
||||
<meta name="copyright" content="`{{$:/core/copyright.txt}}`" />
|
||||
<link id="faviconLink" rel="shortcut icon" href="favicon.ico">
|
||||
<title>{{$:/core/wiki/title}}</title>
|
||||
<title>`{{$:/core/wiki/title}}`</title>
|
||||
<!--~~ This is a Tiddlywiki file. The points of interest in the file are marked with this pattern ~~-->
|
||||
|
||||
<!--~~ Raw markup ~~-->
|
||||
{{{ [all[shadows+tiddlers]tag[$:/core/wiki/rawmarkup]] [all[shadows+tiddlers]tag[$:/tags/RawMarkup]] ||$:/core/templates/plain-text-tiddler}}}
|
||||
{{{ [all[shadows+tiddlers]tag[$:/tags/RawMarkupWikified]] ||$:/core/templates/raw-static-tiddler}}}
|
||||
`{{{ [enlist<saveTiddlerAndShadowsFilter>tag[$:/core/wiki/rawmarkup]] ||$:/core/templates/plain-text-tiddler}}}`
|
||||
`{{{ [enlist<saveTiddlerAndShadowsFilter>tag[$:/tags/RawMarkup]] ||$:/core/templates/plain-text-tiddler}}}`
|
||||
`{{{ [enlist<saveTiddlerAndShadowsFilter>tag[$:/tags/RawMarkupWikified]] ||$:/core/templates/raw-static-tiddler}}}`
|
||||
</head>
|
||||
<body class="tc-body">
|
||||
<!--~~ Raw markup for the top of the body section ~~-->
|
||||
{{{ [all[shadows+tiddlers]tag[$:/tags/RawMarkupWikified/TopBody]] ||$:/core/templates/raw-static-tiddler}}}
|
||||
`{{{ [enlist<saveTiddlerAndShadowsFilter>tag[$:/tags/RawMarkupWikified/TopBody]] ||$:/core/templates/raw-static-tiddler}}}`
|
||||
<!--~~ Static styles ~~-->
|
||||
<div id="styleArea">
|
||||
{{$:/boot/boot.css||$:/core/templates/css-tiddler}}
|
||||
`{{$:/boot/boot.css||$:/core/templates/css-tiddler}}`
|
||||
</div>
|
||||
<!--~~ Static content for Google and browsers without JavaScript ~~-->
|
||||
<noscript>
|
||||
<div id="splashArea">
|
||||
{{$:/core/templates/static.area}}
|
||||
`{{$:/core/templates/static.area}}`
|
||||
</div>
|
||||
</noscript>
|
||||
<!--~~ Ordinary tiddlers ~~-->
|
||||
{{$:/core/templates/store.area.template.html}}
|
||||
`{{$:/core/templates/store.area.template.html}}`
|
||||
<!--~~ Raw markup for the bottom of the body section ~~-->
|
||||
{{{ [all[shadows+tiddlers]tag[$:/tags/RawMarkupWikified/BottomBody]] ||$:/core/templates/raw-static-tiddler}}}
|
||||
`{{{ [enlist<saveTiddlerAndShadowsFilter>tag[$:/tags/RawMarkupWikified/BottomBody]] ||$:/core/templates/raw-static-tiddler}}}`
|
||||
<!--~~ Load external JavaScripts ~~-->
|
||||
<script src="`{{{ [<coreURL>] }}}`" onerror="alert('Error: Cannot load `{{{ [<coreURL>] }}}`');"></script>
|
||||
</body>
|
||||
<!--~~ Load external JS ~~-->
|
||||
<script src="{{{ [<coreURL>] }}}" onerror="alert('Error: Cannot load {{{ [<coreURL>] }}}');"></script>
|
||||
</html>
|
||||
</html>`
|
||||
</$set>
|
@ -12,7 +12,7 @@ field="text"
|
||||
checked="enable"
|
||||
unchecked="disable"
|
||||
default="enable">
|
||||
<<rule>>
|
||||
<span class="tc-small-gap-left"><<rule>></span>
|
||||
</$checkbox>
|
||||
\end
|
||||
|
||||
|
18
core/ui/DownloadFullWiki.tid
Normal file
18
core/ui/DownloadFullWiki.tid
Normal file
@ -0,0 +1,18 @@
|
||||
title: $:/core/ui/DownloadFullWiki
|
||||
|
||||
\whitespace trim
|
||||
\rules except wikilink
|
||||
|
||||
To download the standard single-file version of your wiki:
|
||||
|
||||
<$wikify name="site-title" text={{$:/config/SaveWikiButton/Filename}}>
|
||||
<$let publishFilter="""-[[$:/config/SaveWikiButton/Template]] -[[$:/plugins/tiddlywiki/filesystem]] -[[$:/plugins/tiddlywiki/tiddlyweb]]""">
|
||||
<$button tooltip="Download fully standalone wiki" aria-label="download full wiki" class="tc-btn-big-green">
|
||||
<$action-sendmessage $message="tm-download-file" $param="$:/core/save/all" publishFilter=<<publishFilter>> filename=<<site-title>>/>
|
||||
{{$:/core/images/download-button}}
|
||||
<span class="tc-tiny-gap-left">
|
||||
Download full wiki
|
||||
</span>
|
||||
</$button>
|
||||
</$let>
|
||||
</$wikify>
|
@ -46,9 +46,7 @@ title: $:/core/ui/EditTemplate
|
||||
<$keyboard key="((cancel-edit-tiddler))" actions=<<cancel-delete-tiddler-actions "cancel">> tag="div">
|
||||
<$keyboard key="((save-tiddler))" actions=<<save-tiddler-actions>> tag="div">
|
||||
<$list filter="[all[shadows+tiddlers]tag[$:/tags/EditTemplate]!has[draft.of]]" variable="listItem">
|
||||
<$set name="tv-config-toolbar-class" filter="[<tv-config-toolbar-class>] [<listItem>encodeuricomponent[]addprefix[tc-btn-]]">
|
||||
<$transclude tiddler=<<listItem>>/>
|
||||
</$set>
|
||||
</$list>
|
||||
</$keyboard>
|
||||
</$keyboard>
|
||||
|
@ -7,6 +7,6 @@ $:/config/EditToolbarButtons/Visibility/$(listItem)$
|
||||
\whitespace trim
|
||||
<div class="tc-tiddler-title tc-tiddler-edit-title">
|
||||
<$view field="title"/>
|
||||
<span class="tc-tiddler-controls tc-titlebar"><$list filter="[all[shadows+tiddlers]tag[$:/tags/EditToolbar]!has[draft.of]]" variable="listItem"><$reveal type="nomatch" state=<<config-title>> text="hide"><$transclude tiddler=<<listItem>>/></$reveal></$list></span>
|
||||
<span class="tc-tiddler-controls tc-titlebar"><$list filter="[all[shadows+tiddlers]tag[$:/tags/EditToolbar]!has[draft.of]]" variable="listItem"><$let tv-config-toolbar-class={{{ [enlist<tv-config-toolbar-class>] [<listItem>encodeuricomponent[]addprefix[tc-btn-]] +[join[ ]]}}}><$reveal type="nomatch" state=<<config-title>> text="hide"><$transclude tiddler=<<listItem>>/></$reveal></$let></$list></span>
|
||||
<div style="clear: both;"></div>
|
||||
</div>
|
||||
|
@ -3,16 +3,23 @@ tags: $:/tags/EditToolbar
|
||||
caption: {{$:/core/images/done-button}} {{$:/language/Buttons/Save/Caption}}
|
||||
description: {{$:/language/Buttons/Save/Hint}}
|
||||
|
||||
\whitespace trim
|
||||
\define save-tiddler-button()
|
||||
\whitespace trim
|
||||
<$fieldmangler><$button tooltip={{$:/language/Buttons/Save/Hint}} aria-label={{$:/language/Buttons/Save/Caption}} class=<<tv-config-toolbar-class>>>
|
||||
<<save-tiddler-actions>>
|
||||
<$list filter="[<tv-config-toolbar-icons>match[yes]]">
|
||||
{{$:/core/images/done-button}}
|
||||
</$list>
|
||||
<$list filter="[<tv-config-toolbar-text>match[yes]]">
|
||||
<span class="tc-btn-text"><$text text={{$:/language/Buttons/Save/Caption}}/></span>
|
||||
</$list>
|
||||
</$button></$fieldmangler>
|
||||
<$fieldmangler>
|
||||
<$button
|
||||
tooltip={{$:/language/Buttons/Save/Hint}}
|
||||
aria-label={{$:/language/Buttons/Save/Caption}}
|
||||
class=<<tv-config-toolbar-class>>
|
||||
>
|
||||
<<save-tiddler-actions>>
|
||||
<$list filter="[<tv-config-toolbar-icons>match[yes]]">
|
||||
{{$:/core/images/done-button}}
|
||||
</$list>
|
||||
<$list filter="[<tv-config-toolbar-text>match[yes]]">
|
||||
<span class="tc-btn-text"><$text text={{$:/language/Buttons/Save/Caption}}/></span>
|
||||
</$list>
|
||||
</$button>
|
||||
</$fieldmangler>
|
||||
\end
|
||||
<<save-tiddler-button>>
|
||||
|
@ -1,11 +1,6 @@
|
||||
title: $:/core/ui/ExportTiddlyWikiCore
|
||||
|
||||
\define jsFileName() tiddlywikicore-$(version)$.js
|
||||
\define noExportMsg()
|
||||
It appears that you have a wiki with an external ~TiddlyWiki core. The export action cannot be performed.
|
||||
<p>You will need to view the page source in your browser. Then go to the very bottom the the source, find the last `<script>`
|
||||
element, and right-click its `src` URI. Save the link as ''$(jsFileName)$''</p>
|
||||
\end
|
||||
\rules except wikilink
|
||||
\whitespace trim
|
||||
|
||||
@ -17,16 +12,11 @@ Export the TiddlyWiki core JavaScript code for running with external JavaScript:
|
||||
tooltip="Export the TiddlyWiki core code for running with external JavaScript"
|
||||
aria-label="export TiddlyWiki core"
|
||||
class="tc-btn-big-green">
|
||||
<$list
|
||||
filter="[[$:/boot/boot.js]is[missing]]"
|
||||
variable="ignore"
|
||||
emptyMessage="<$action-sendmessage $message='tm-download-file' $param='$:/core/templates/tiddlywiki5.js' filename=<<jsFileName>>/>" >
|
||||
<$action-setfield $tiddler=<<qualify "$:/temp/alert">> text=<<noExportMsg>> subtitle="Export ~TiddllyWiki Core"/>
|
||||
<$action-sendmessage $message="tm-modal" $param=<<qualify "$:/temp/alert">>/>
|
||||
</$list>
|
||||
<$action-sendmessage $message='tm-download-file' $param='$:/core/templates/tiddlywiki5.js' filename=<<jsFileName>>/>
|
||||
{{$:/core/images/download-button}}
|
||||
 
|
||||
<span class="tc-tiny-gap-left">
|
||||
Download TiddlyWiki core
|
||||
</span>
|
||||
</$button>
|
||||
|
||||
[[Further information|https://tiddlywiki.com/#Using%20the%20external%20JavaScript%20template]]
|
||||
|
@ -13,13 +13,13 @@ caption: {{$:/language/ControlPanel/LayoutSwitcher/Caption}}
|
||||
<$set name="cls" filter="[all[current]field:title{$:/layout}]" value="tc-chooser-item tc-chosen" emptyValue="tc-chooser-item">
|
||||
<div class=<<cls>>>
|
||||
<$link to={{!!title}}>
|
||||
''<$transclude field="name"/>'' - <$transclude field="description"/>
|
||||
''<$transclude tiddler={{{ [<currentTiddler>get[icon]] }}}/><$transclude field="name"/>'' - <$transclude field="description"/>
|
||||
</$link></div></$set>
|
||||
""">
|
||||
<$set name="cls" filter="[all[current]field:title[$:/core/ui/PageTemplate]]" value="tc-chooser-item tc-chosen" emptyValue="tc-chooser-item">
|
||||
<div class=<<cls>>>
|
||||
<$link to={{!!title}}>
|
||||
''<$transclude field="name"/>'' - <$transclude field="description"/>
|
||||
''<$transclude tiddler={{{ [<currentTiddler>get[icon]] }}}/><$transclude field="name"/>'' - <$transclude field="description"/>
|
||||
</$link>
|
||||
</div>
|
||||
</$set>
|
||||
|
@ -2,26 +2,17 @@ title: $:/core/ui/MoreSideBar/Tags
|
||||
tags: $:/tags/MoreSideBar
|
||||
caption: {{$:/language/SideBar/Tags/Caption}}
|
||||
|
||||
<$set name="tv-config-toolbar-icons" value="yes">
|
||||
|
||||
<$set name="tv-config-toolbar-text" value="yes">
|
||||
|
||||
<$set name="tv-config-toolbar-class" value="">
|
||||
|
||||
{{$:/core/ui/Buttons/tag-manager}}
|
||||
|
||||
</$set>
|
||||
|
||||
</$set>
|
||||
|
||||
</$set>
|
||||
\whitespace trim
|
||||
|
||||
<$let tv-config-toolbar-icons="yes" tv-config-toolbar-text="yes" tv-config-toolbar-class="">
|
||||
<div class="tc-tiny-v-gap-bottom">
|
||||
{{$:/core/ui/Buttons/tag-manager}}
|
||||
</div>
|
||||
</$let>
|
||||
<$list filter={{$:/core/Filters/AllTags!!filter}}>
|
||||
|
||||
<$transclude tiddler="$:/core/ui/TagTemplate"/>
|
||||
|
||||
<div class="tc-tiny-v-gap-bottom">
|
||||
<$transclude tiddler="$:/core/ui/TagTemplate"/>
|
||||
</div>
|
||||
</$list>
|
||||
|
||||
<hr class="tc-untagged-separator">
|
||||
|
||||
{{$:/core/ui/UntaggedTemplate}}
|
||||
|
@ -1,6 +1,6 @@
|
||||
title: $:/core/ui/Buttons/save-wiki
|
||||
tags: $:/tags/PageControls
|
||||
caption: {{$:/core/images/save-button}} {{$:/language/Buttons/SaveWiki/Caption}}
|
||||
caption: {{$:/core/images/save-button-dynamic}} {{$:/language/Buttons/SaveWiki/Caption}}
|
||||
description: {{$:/language/Buttons/SaveWiki/Hint}}
|
||||
|
||||
\whitespace trim
|
||||
@ -10,7 +10,7 @@ description: {{$:/language/Buttons/SaveWiki/Hint}}
|
||||
</$wikify>
|
||||
<span class="tc-dirty-indicator">
|
||||
<$list filter="[<tv-config-toolbar-icons>match[yes]]">
|
||||
{{$:/core/images/save-button}}
|
||||
{{$:/core/images/save-button-dynamic}}
|
||||
</$list>
|
||||
<$list filter="[<tv-config-toolbar-text>match[yes]]">
|
||||
<span class="tc-btn-text">
|
||||
|
@ -1,6 +1,7 @@
|
||||
title: $:/core/ui/PageTemplate
|
||||
name: {{$:/language/PageTemplate/Name}}
|
||||
description: {{$:/language/PageTemplate/Description}}
|
||||
icon: $:/core/images/layout-button
|
||||
|
||||
\whitespace trim
|
||||
\import [[$:/core/ui/PageMacros]] [all[shadows+tiddlers]tag[$:/tags/Macro]!has[draft.of]]
|
||||
|
@ -3,10 +3,8 @@ title: $:/core/ui/UntaggedTemplate
|
||||
\define lingo-base() $:/language/SideBar/
|
||||
\whitespace trim
|
||||
<$button popup=<<qualify "$:/state/popup/tag">> class="tc-btn-invisible tc-untagged-label tc-tag-label">
|
||||
<<lingo Tags/Untagged/Caption>>
|
||||
<<lingo Tags/Untagged/Caption>>
|
||||
</$button>
|
||||
<$reveal state=<<qualify "$:/state/popup/tag">> type="popup" position="below">
|
||||
<div class="tc-drop-down">
|
||||
<$list filter="[untagged[]!is[system]] -[tags[]] +[sort[title]]" template="$:/core/ui/ListItemTemplate"/>
|
||||
</div>
|
||||
<$reveal class="tc-drop-down" tag="div" state=<<qualify "$:/state/popup/tag">> type="popup" position="below">
|
||||
<$list filter="[untagged[]!is[system]] -[tags[]] +[sort[title]]" template="$:/core/ui/ListItemTemplate"/>
|
||||
</$reveal>
|
||||
|
@ -4,5 +4,5 @@ title: $:/snippets/download-wiki-button
|
||||
\whitespace trim
|
||||
<$button class="tc-btn-big-green">
|
||||
<$action-sendmessage $message="tm-download-file" $param="$:/core/save/all" filename="index.html"/>
|
||||
<<lingo Full/Caption>> {{$:/core/images/save-button}}
|
||||
<<lingo Full/Caption>> {{$:/core/images/save-button-dynamic}}
|
||||
</$button>
|
@ -4,76 +4,85 @@ tags: $:/tags/Macro
|
||||
\define change-input-tab(stateTitle,tag,beforeafter,defaultState,actions)
|
||||
\whitespace trim
|
||||
<$set name="tabsList" filter="[all[shadows+tiddlers]tag<__tag__>!has[draft.of]]">
|
||||
<$let
|
||||
currentState={{{ [<__stateTitle__>!is[missing]get[text]] ~[<__defaultState__>] }}}
|
||||
firstTab={{{ [enlist<tabsList>nth[1]] }}}
|
||||
lastTab={{{ [enlist<tabsList>last[]] }}}
|
||||
nextTab={{{ [all[shadows+tiddlers]tag<__tag__>!has[draft.of]$beforeafter$<currentState>] ~[[$beforeafter$]removeprefix[after]suffix[]addprefix<firstTab>] ~[[$beforeafter$]removeprefix[before]suffix[]addprefix<lastTab>] }}}>
|
||||
<$action-setfield $tiddler=<<__stateTitle__>> text=<<nextTab>>/>
|
||||
$actions$
|
||||
</$let>
|
||||
<$let
|
||||
currentState={{{ [<__stateTitle__>!is[missing]get[text]] ~[<__defaultState__>] }}}
|
||||
firstTab={{{ [enlist<tabsList>nth[1]] }}}
|
||||
lastTab={{{ [enlist<tabsList>last[]] }}}
|
||||
nextTab={{{ [all[shadows+tiddlers]tag<__tag__>!has[draft.of]$beforeafter$<currentState>] ~[[$beforeafter$]removeprefix[after]suffix[]addprefix<firstTab>] ~[[$beforeafter$]removeprefix[before]suffix[]addprefix<lastTab>] }}}
|
||||
>
|
||||
<$action-setfield $tiddler=<<__stateTitle__>> text=<<nextTab>>/>
|
||||
$actions$
|
||||
</$let>
|
||||
</$set>
|
||||
\end
|
||||
|
||||
\define keyboard-input-actions()
|
||||
\whitespace trim
|
||||
<$list filter="[<__index__>match[]]">
|
||||
<$action-setfield $tiddler=<<__storeTitle__>> text={{{ [<__tiddler__>get<__field__>] }}}/>
|
||||
<$action-setfield $tiddler=<<__storeTitle__>> text={{{ [<__tiddler__>get<__field__>] }}}/>
|
||||
</$list>
|
||||
<$list filter="[<__index__>!match[]]">
|
||||
<$action-setfield $tiddler=<<__storeTitle__>> text={{{ [<__tiddler__>getindex<__index__>] }}}/>
|
||||
<$action-setfield $tiddler=<<__storeTitle__>> text={{{ [<__tiddler__>getindex<__index__>] }}}/>
|
||||
</$list>
|
||||
\end
|
||||
|
||||
\define input-next-actions-inner()
|
||||
\whitespace trim
|
||||
<$list filter="[<nextItem>minlength[1]]" variable="ignore">
|
||||
<$action-setfield $tiddler=<<__selectionStateTitle__>> text=<<nextItem>>/>
|
||||
<$list filter="[<__index__>match[]]">
|
||||
<$action-setfield $tiddler=<<__tiddler__>> $field=<<__field__>> $value={{{ [<nextItem>] +[splitregexp[(?:.(?!-))+$]] }}}/>
|
||||
</$list>
|
||||
<$list filter="[<__index__>!match[]]">
|
||||
<$action-setfield $tiddler=<<__tiddler__>> $index=<<__index__>> $value={{{ [<nextItem>] +[splitregexp[(?:.(?!-))+$]] }}}/>
|
||||
</$list>
|
||||
<$action-setfield $tiddler=<<__refreshTitle__>> text="yes"/>
|
||||
<$action-setfield $tiddler=<<__selectionStateTitle__>> text=<<nextItem>>/>
|
||||
<$list filter="[<__index__>match[]]">
|
||||
<$action-setfield $tiddler=<<__tiddler__>> $field=<<__field__>> $value={{{ [<nextItem>] +[splitregexp[(?:.(?!-))+$]] }}}/>
|
||||
</$list>
|
||||
<$list filter="[<__index__>!match[]]">
|
||||
<$action-setfield $tiddler=<<__tiddler__>> $index=<<__index__>> $value={{{ [<nextItem>] +[splitregexp[(?:.(?!-))+$]] }}}/>
|
||||
</$list>
|
||||
<$action-setfield $tiddler=<<__refreshTitle__>> text="yes"/>
|
||||
</$list>
|
||||
\end
|
||||
|
||||
\define input-next-actions(afterOrBefore:"after",reverse:"")
|
||||
\whitespace trim
|
||||
<$list filter="[<__storeTitle__>get[text]minlength<__filterMinLength__>] [<__filterMinLength__>match[0]] +[limit[1]]" variable="ignore">
|
||||
<$let
|
||||
userInput={{{ [<__storeTitle__>get[text]] }}}
|
||||
selectedItem={{{ [<__selectionStateTitle__>get[text]] }}}
|
||||
configTiddler={{{ [subfilter<__configTiddlerFilter__>] }}}
|
||||
primaryListFilter={{{ [<configTiddler>get<__firstSearchFilterField__>] }}}
|
||||
secondaryListFilter={{{ [<configTiddler>get<__secondSearchFilterField__>] }}}>
|
||||
<$set name="filteredList" filter="[subfilter<primaryListFilter>addsuffix[-primaryList]] =[subfilter<secondaryListFilter>addsuffix[-secondaryList]]">
|
||||
<$let
|
||||
nextItem={{{ [enlist<filteredList>$afterOrBefore$<selectedItem>] ~[enlist<filteredList>$reverse$nth[1]] }}}
|
||||
firstItem={{{ [enlist<filteredList>nth[1]] }}}
|
||||
lastItem={{{ [enlist<filteredList>last[]] }}}>
|
||||
<$list filter="[<selectedItem>match<firstItem>!match<lastItem>]" variable="ignore">
|
||||
<$set name="nextItem" value={{{ [[$afterOrBefore$]match[before]then<userInput>addsuffix[-userInput]] ~[<nextItem>] }}}>
|
||||
<<input-next-actions-inner>>
|
||||
</$set>
|
||||
</$list>
|
||||
<$list filter="[<selectedItem>match<lastItem>!match<firstItem>]" variable="ignore">
|
||||
<$set name="nextItem" value={{{ [[$afterOrBefore$]match[after]then<userInput>addsuffix[-userInput]] ~[<nextItem>] }}}>
|
||||
<<input-next-actions-inner>>
|
||||
</$set>
|
||||
</$list>
|
||||
<$list filter="[<selectedItem>match<firstItem>match<lastItem>]" variable="ignore">
|
||||
<$set name="nextItem" value={{{ [<userInput>addsuffix[-userInput]] }}}>
|
||||
<<input-next-actions-inner>>
|
||||
</$set>
|
||||
</$list>
|
||||
<$list filter="[<selectedItem>!match<firstItem>!match<lastItem>]" variable="ignore">
|
||||
<<input-next-actions-inner>>
|
||||
</$list>
|
||||
</$let>
|
||||
</$set>
|
||||
</$let>
|
||||
<$list
|
||||
filter="[<__storeTitle__>get[text]minlength<__filterMinLength__>] [<__filterMinLength__>match[0]] +[limit[1]]"
|
||||
variable="ignore"
|
||||
>
|
||||
<$let
|
||||
userInput={{{ [<__storeTitle__>get[text]] }}}
|
||||
selectedItem={{{ [<__selectionStateTitle__>get[text]] }}}
|
||||
configTiddler={{{ [subfilter<__configTiddlerFilter__>] }}}
|
||||
primaryListFilter={{{ [<configTiddler>get<__firstSearchFilterField__>] }}}
|
||||
secondaryListFilter={{{ [<configTiddler>get<__secondSearchFilterField__>] }}}
|
||||
>
|
||||
<$set
|
||||
name="filteredList"
|
||||
filter="[subfilter<primaryListFilter>addsuffix[-primaryList]] =[subfilter<secondaryListFilter>addsuffix[-secondaryList]]"
|
||||
>
|
||||
<$let
|
||||
nextItem={{{ [enlist<filteredList>$afterOrBefore$<selectedItem>] ~[enlist<filteredList>$reverse$nth[1]] }}}
|
||||
firstItem={{{ [enlist<filteredList>nth[1]] }}}
|
||||
lastItem={{{ [enlist<filteredList>last[]] }}}
|
||||
>
|
||||
<$list filter="[<selectedItem>match<firstItem>!match<lastItem>]" variable="ignore">
|
||||
<$set name="nextItem" value={{{ [[$afterOrBefore$]match[before]then<userInput>addsuffix[-userInput]] ~[<nextItem>] }}}>
|
||||
<<input-next-actions-inner>>
|
||||
</$set>
|
||||
</$list>
|
||||
<$list filter="[<selectedItem>match<lastItem>!match<firstItem>]" variable="ignore">
|
||||
<$set name="nextItem" value={{{ [[$afterOrBefore$]match[after]then<userInput>addsuffix[-userInput]] ~[<nextItem>] }}}>
|
||||
<<input-next-actions-inner>>
|
||||
</$set>
|
||||
</$list>
|
||||
<$list filter="[<selectedItem>match<firstItem>match<lastItem>]" variable="ignore">
|
||||
<$set name="nextItem" value={{{ [<userInput>addsuffix[-userInput]] }}}>
|
||||
<<input-next-actions-inner>>
|
||||
</$set>
|
||||
</$list>
|
||||
<$list filter="[<selectedItem>!match<firstItem>!match<lastItem>]" variable="ignore">
|
||||
<<input-next-actions-inner>>
|
||||
</$list>
|
||||
</$let>
|
||||
</$set>
|
||||
</$let>
|
||||
</$list>
|
||||
\end
|
||||
|
||||
@ -84,12 +93,14 @@ $actions$
|
||||
<$keyboard key="((input-up))" actions=<<input-next-actions "before" "reverse[]">>>
|
||||
<$keyboard key="((input-down))" actions=<<input-next-actions>>>
|
||||
<$keyboard key="((input-cancel))" actions=<<__inputCancelActions__>>>
|
||||
<$edit-text tiddler=<<__tiddler__>> field=<<__field__>> index=<<__index__>>
|
||||
inputActions=<<keyboard-input-actions>> tag=<<__tag__>> class=<<__class__>>
|
||||
placeholder=<<__placeholder__>> default=<<__default__>> focusPopup=<<__focusPopup__>>
|
||||
focus=<<__focus__>> type=<<__type__>> rows=<<__rows__>> minHeight=<<__minHeight__>>
|
||||
tabindex=<<__tabindex__>> size=<<__size__>> autoHeight=<<__autoHeight__>>
|
||||
refreshTitle=<<__refreshTitle__>> cancelPopups=<<__cancelPopups__>>/>
|
||||
<$edit-text
|
||||
tiddler=<<__tiddler__>> field=<<__field__>> index=<<__index__>>
|
||||
inputActions=<<keyboard-input-actions>> tag=<<__tag__>> class=<<__class__>>
|
||||
placeholder=<<__placeholder__>> default=<<__default__>> focusPopup=<<__focusPopup__>>
|
||||
focus=<<__focus__>> type=<<__type__>> rows=<<__rows__>> minHeight=<<__minHeight__>>
|
||||
tabindex=<<__tabindex__>> size=<<__size__>> autoHeight=<<__autoHeight__>>
|
||||
refreshTitle=<<__refreshTitle__>> cancelPopups=<<__cancelPopups__>>
|
||||
/>
|
||||
</$keyboard>
|
||||
</$keyboard>
|
||||
</$keyboard>
|
||||
|
@ -26,7 +26,7 @@ tags: $:/tags/Macro
|
||||
\whitespace trim
|
||||
<span class="tc-links-draggable-list">
|
||||
<$vars targetTiddler="""$tiddler$""" targetField="""$field$""">
|
||||
<$type$ class="$class$">
|
||||
<$genesis $type=<<__type__>> class="$class$">
|
||||
<$list filter="[list[$tiddler$!!$field$]]" emptyMessage=<<__emptyMessage__>>>
|
||||
<$droppable actions=<<list-links-draggable-drop-actions>> tag="""$subtype$""" enable=<<tv-enable-drag-and-drop>>>
|
||||
<div class="tc-droppable-placeholder"/>
|
||||
@ -51,7 +51,7 @@ tags: $:/tags/Macro
|
||||
<div style="height:0.5em;"/>
|
||||
</$droppable>
|
||||
</$tiddler>
|
||||
</$type$>
|
||||
</$genesis>
|
||||
</$vars>
|
||||
</span>
|
||||
\end
|
||||
@ -84,24 +84,24 @@ tags: $:/tags/Macro
|
||||
<span class="tc-tagged-draggable-list">
|
||||
<$set name="tag" value=<<__tag__>>>
|
||||
<$list filter="[<__tag__>tagging[]$subFilter$]" emptyMessage=<<__emptyMessage__>> storyview=<<__storyview__>>>
|
||||
<$elementTag$ class="tc-menu-list-item">
|
||||
<$genesis $type=<<__elementTag__>> class="tc-menu-list-item">
|
||||
<$droppable actions="""<$macrocall $name="list-tagged-draggable-drop-actions" tag=<<__tag__>>/>""" enable=<<tv-enable-drag-and-drop>>>
|
||||
<$elementTag$ class="tc-droppable-placeholder"/>
|
||||
<$elementTag$>
|
||||
<$genesis $type=<<__elementTag__>> class="tc-droppable-placeholder"/>
|
||||
<$genesis $type=<<__elementTag__>>>
|
||||
<$transclude tiddler="""$itemTemplate$""">
|
||||
<$link to={{!!title}}>
|
||||
<$view field="title"/>
|
||||
</$link>
|
||||
</$transclude>
|
||||
</$elementTag$>
|
||||
</$genesis>
|
||||
</$droppable>
|
||||
</$elementTag$>
|
||||
</$genesis>
|
||||
</$list>
|
||||
<$tiddler tiddler="">
|
||||
<$droppable actions="""<$macrocall $name="list-tagged-draggable-drop-actions" tag=<<__tag__>>/>""" enable=<<tv-enable-drag-and-drop>>>
|
||||
<$elementTag$ class="tc-droppable-placeholder"/>
|
||||
<$elementTag$ style="height:0.5em;">
|
||||
</$elementTag$>
|
||||
<$genesis $type=<<__elementTag__>> class="tc-droppable-placeholder"/>
|
||||
<$genesis $type=<<__elementTag__>> style="height:0.5em;">
|
||||
</$genesis>
|
||||
</$droppable>
|
||||
</$tiddler>
|
||||
</$set>
|
||||
|
@ -10,10 +10,14 @@ second-search-filter: [tags[]is[system]search:title<userInput>sort[]]
|
||||
\define add-tag-actions(actions,tagField:"tags")
|
||||
\whitespace trim
|
||||
<$set name="tag" value={{{ [<__tiddler__>get[text]] }}}>
|
||||
<$list filter="[<saveTiddler>!contains:$tagField$<tag>!match[]]" variable="ignore" emptyMessage="<$action-listops $tiddler=<<saveTiddler>> $field=<<__tagField__>> $subfilter='-[<tag>]'/>">
|
||||
<$action-listops $tiddler=<<saveTiddler>> $field=<<__tagField__>> $subfilter="[<tag>trim[]]"/>
|
||||
$actions$
|
||||
</$list>
|
||||
<$list
|
||||
filter="[<saveTiddler>!contains:$tagField$<tag>!match[]]"
|
||||
variable="ignore"
|
||||
emptyMessage="<$action-listops $tiddler=<<saveTiddler>> $field=<<__tagField__>> $subfilter='-[<tag>]'/>"
|
||||
>
|
||||
<$action-listops $tiddler=<<saveTiddler>> $field=<<__tagField__>> $subfilter="[<tag>trim[]]"/>
|
||||
$actions$
|
||||
</$list>
|
||||
</$set>
|
||||
<<delete-tag-state-tiddlers>>
|
||||
<$action-setfield $tiddler=<<refreshTitle>> text="yes"/>
|
||||
@ -21,80 +25,153 @@ $actions$
|
||||
|
||||
\define clear-tags-actions-inner()
|
||||
\whitespace trim
|
||||
<$list filter="[<storeTitle>has[text]] [<newTagNameTiddler>has[text]]" variable="ignore" emptyMessage="<<cancel-delete-tiddler-actions 'cancel'>>">
|
||||
<<delete-tag-state-tiddlers>>
|
||||
<$list
|
||||
filter="[<storeTitle>has[text]] [<newTagNameTiddler>has[text]]"
|
||||
variable="ignore"
|
||||
emptyMessage="<<cancel-delete-tiddler-actions 'cancel'>>"
|
||||
>
|
||||
<<delete-tag-state-tiddlers>>
|
||||
</$list>
|
||||
\end
|
||||
|
||||
\define clear-tags-actions()
|
||||
\whitespace trim
|
||||
<$set name="userInput" value={{{ [<storeTitle>get[text]] }}}>
|
||||
<$list filter="[<newTagNameTiddler>get[text]!match<userInput>]" emptyMessage="<<clear-tags-actions-inner>>">
|
||||
<$action-setfield $tiddler=<<newTagNameTiddler>> text=<<userInput>>/><$action-setfield $tiddler=<<refreshTitle>> text="yes"/>
|
||||
</$list>
|
||||
<$list filter="[<newTagNameTiddler>get[text]!match<userInput>]" emptyMessage="<<clear-tags-actions-inner>>">
|
||||
<$action-setfield $tiddler=<<newTagNameTiddler>> text=<<userInput>>/><$action-setfield $tiddler=<<refreshTitle>> text="yes"/>
|
||||
</$list>
|
||||
</$set>
|
||||
\end
|
||||
|
||||
\define tag-picker-inner(actions,tagField:"tags")
|
||||
\whitespace trim
|
||||
<$vars newTagNameInputTiddlerQualified=<<qualify "$:/temp/NewTagName/input">> newTagNameSelectionTiddlerQualified=<<qualify "$:/temp/NewTagName/selected-item">> fallbackTarget={{$(palette)$##tag-background}} colourA={{$(palette)$##foreground}} colourB={{$(palette)$##background}}>
|
||||
<$vars storeTitle={{{ [<newTagNameInputTiddler>!match[]] ~[<newTagNameInputTiddlerQualified>] }}} tagSelectionState={{{ [<newTagNameSelectionTiddler>!match[]] ~[<newTagNameSelectionTiddlerQualified>] }}}>
|
||||
<$vars refreshTitle=<<qualify "$:/temp/NewTagName/refresh">> nonSystemTagsFilter="[tags[]!is[system]search:title<userInput>sort[]]" systemTagsFilter="[tags[]is[system]search:title<userInput>sort[]]">
|
||||
<div class="tc-edit-add-tag">
|
||||
<div>
|
||||
<span class="tc-add-tag-name tc-small-gap-right">
|
||||
<$macrocall $name="keyboard-driven-input" tiddler=<<newTagNameTiddler>> storeTitle=<<storeTitle>> refreshTitle=<<refreshTitle>>
|
||||
selectionStateTitle=<<tagSelectionState>> inputAcceptActions="<$macrocall $name='add-tag-actions' actions=<<__actions__>> tagField=<<__tagField__>>/>"
|
||||
inputCancelActions=<<clear-tags-actions>> tag="input" placeholder={{$:/language/EditTemplate/Tags/Add/Placeholder}}
|
||||
focusPopup=<<qualify "$:/state/popup/tags-auto-complete">> class="tc-edit-texteditor tc-popup-handle" tabindex=<<tabIndex>>
|
||||
focus={{{ [{$:/config/AutoFocus}match[tags]then[true]] ~[[false]] }}} filterMinLength={{$:/config/Tags/MinLength}}
|
||||
cancelPopups=<<cancelPopups>> configTiddlerFilter="[[$:/core/macros/tag-picker]]"/>
|
||||
</span><$button popup=<<qualify "$:/state/popup/tags-auto-complete">> class="tc-btn-invisible tc-btn-dropdown" tooltip={{$:/language/EditTemplate/Tags/Dropdown/Hint}} aria-label={{$:/language/EditTemplate/Tags/Dropdown/Caption}}>{{$:/core/images/down-arrow}}</$button><$reveal state=<<storeTitle>> type="nomatch" text=""><$button class="tc-btn-invisible tc-small-gap tc-btn-dropdown" tooltip={{$:/language/EditTemplate/Tags/ClearInput/Hint}} aria-label={{$:/language/EditTemplate/Tags/ClearInput/Caption}}>{{$:/core/images/close-button}}<<delete-tag-state-tiddlers>></$button></$reveal><span class="tc-add-tag-button tc-small-gap-left">
|
||||
<$set name="tag" value={{{ [<newTagNameTiddler>get[text]] }}}>
|
||||
<$button set=<<newTagNameTiddler>> setTo="" class="">
|
||||
<$action-listops $tiddler=<<saveTiddler>> $field=<<__tagField__>> $subfilter="[<tag>trim[]]"/>
|
||||
$actions$
|
||||
<$set name="currentTiddlerCSSEscaped" value={{{ [<saveTiddler>escapecss[]] }}}>
|
||||
<<delete-tag-state-tiddlers>><$action-sendmessage $message="tm-focus-selector" $param=<<get-tagpicker-focus-selector>>/>
|
||||
</$set>
|
||||
{{$:/language/EditTemplate/Tags/Add/Button}}
|
||||
</$button>
|
||||
</$set>
|
||||
</span>
|
||||
</div>
|
||||
<div class="tc-block-dropdown-wrapper">
|
||||
<$reveal state=<<qualify "$:/state/popup/tags-auto-complete">> type="nomatch" text="" default="">
|
||||
<div class="tc-block-dropdown tc-block-tags-dropdown">
|
||||
<$set name="userInput" value={{{ [<storeTitle>get[text]] }}}>
|
||||
<$list filter="[<userInput>minlength{$:/config/Tags/MinLength}limit[1]]" emptyMessage="<div class='tc-search-results'>{{$:/language/Search/Search/TooShort}}</div>" variable="listItem">
|
||||
<$list filter=<<nonSystemTagsFilter>> variable="tag">
|
||||
<$list filter="[<tag>addsuffix[-primaryList]] -[<tagSelectionState>get[text]]" emptyMessage="<$vars button-classes='tc-btn-invisible tc-tag-button-selected' actions=<<__actions__>> tagField=<<__tagField__>> currentTiddler=<<tag>>>{{||$:/core/ui/TagPickerTagTemplate}}</$vars>">
|
||||
<$vars button-classes="tc-btn-invisible" actions=<<__actions__>> tagField=<<__tagField__>> currentTiddler=<<tag>>>{{||$:/core/ui/TagPickerTagTemplate}}</$vars>
|
||||
</$list>
|
||||
</$list></$list>
|
||||
<hr>
|
||||
<$list filter="[<userInput>minlength{$:/config/Tags/MinLength}limit[1]]" emptyMessage="<div class='tc-search-results'>{{$:/language/Search/Search/TooShort}}</div>" variable="listItem">
|
||||
<$list filter=<<systemTagsFilter>> variable="tag">
|
||||
<$list filter="[<tag>addsuffix[-secondaryList]] -[<tagSelectionState>get[text]]" emptyMessage="<$vars button-classes='tc-btn-invisible tc-tag-button-selected' actions=<<__actions__>> tagField=<<__tagField__>> currentTiddler=<<tag>>>{{||$:/core/ui/TagPickerTagTemplate}}</$vars>">
|
||||
<$vars button-classes="tc-btn-invisible" actions=<<__actions__>> tagField=<<__tagField__>> currentTiddler=<<tag>>>{{||$:/core/ui/TagPickerTagTemplate}}</$vars>
|
||||
</$list>
|
||||
</$list></$list>
|
||||
</$set>
|
||||
</div>
|
||||
</$reveal>
|
||||
</div>
|
||||
</div>
|
||||
</$vars>
|
||||
</$vars>
|
||||
<$vars
|
||||
newTagNameInputTiddlerQualified=<<qualify "$:/temp/NewTagName/input">>
|
||||
newTagNameSelectionTiddlerQualified=<<qualify "$:/temp/NewTagName/selected-item">>
|
||||
fallbackTarget={{$(palette)$##tag-background}}
|
||||
colourA={{$(palette)$##foreground}}
|
||||
colourB={{$(palette)$##background}}
|
||||
>
|
||||
<$vars
|
||||
storeTitle={{{ [<newTagNameInputTiddler>!match[]] ~[<newTagNameInputTiddlerQualified>] }}}
|
||||
tagSelectionState={{{ [<newTagNameSelectionTiddler>!match[]] ~[<newTagNameSelectionTiddlerQualified>] }}}
|
||||
>
|
||||
<$vars
|
||||
refreshTitle=<<qualify "$:/temp/NewTagName/refresh">>
|
||||
nonSystemTagsFilter="[tags[]!is[system]search:title<userInput>sort[]]"
|
||||
systemTagsFilter="[tags[]is[system]search:title<userInput>sort[]]"
|
||||
>
|
||||
<div class="tc-edit-add-tag">
|
||||
<div>
|
||||
<span class="tc-add-tag-name tc-small-gap-right">
|
||||
<$macrocall
|
||||
$name="keyboard-driven-input"
|
||||
tiddler=<<newTagNameTiddler>>
|
||||
storeTitle=<<storeTitle>>
|
||||
refreshTitle=<<refreshTitle>>
|
||||
selectionStateTitle=<<tagSelectionState>>
|
||||
inputAcceptActions="<$macrocall $name='add-tag-actions' actions=<<__actions__>> tagField=<<__tagField__>>/>"
|
||||
inputCancelActions=<<clear-tags-actions>>
|
||||
tag="input"
|
||||
placeholder={{$:/language/EditTemplate/Tags/Add/Placeholder}}
|
||||
focusPopup=<<qualify "$:/state/popup/tags-auto-complete">>
|
||||
class="tc-edit-texteditor tc-popup-handle"
|
||||
tabindex=<<tabIndex>>
|
||||
focus={{{ [{$:/config/AutoFocus}match[tags]then[true]] ~[[false]] }}}
|
||||
filterMinLength={{$:/config/Tags/MinLength}}
|
||||
cancelPopups=<<cancelPopups>>
|
||||
configTiddlerFilter="[[$:/core/macros/tag-picker]]"
|
||||
/>
|
||||
</span>
|
||||
<$button popup=<<qualify "$:/state/popup/tags-auto-complete">>
|
||||
class="tc-btn-invisible tc-btn-dropdown"
|
||||
tooltip={{$:/language/EditTemplate/Tags/Dropdown/Hint}}
|
||||
aria-label={{$:/language/EditTemplate/Tags/Dropdown/Caption}}
|
||||
>
|
||||
{{$:/core/images/down-arrow}}
|
||||
</$button>
|
||||
<$reveal state=<<storeTitle>> type="nomatch" text="">
|
||||
<$button class="tc-btn-invisible tc-small-gap tc-btn-dropdown"
|
||||
tooltip={{$:/language/EditTemplate/Tags/ClearInput/Hint}}
|
||||
aria-label={{$:/language/EditTemplate/Tags/ClearInput/Caption}}
|
||||
>
|
||||
{{$:/core/images/close-button}}<<delete-tag-state-tiddlers>>
|
||||
</$button>
|
||||
</$reveal>
|
||||
<span class="tc-add-tag-button tc-small-gap-left">
|
||||
<$set name="tag" value={{{ [<newTagNameTiddler>get[text]] }}}>
|
||||
<$button set=<<newTagNameTiddler>> setTo="" class="">
|
||||
<$action-listops $tiddler=<<saveTiddler>> $field=<<__tagField__>> $subfilter="[<tag>trim[]]"/>
|
||||
$actions$
|
||||
<$set name="currentTiddlerCSSEscaped" value={{{ [<saveTiddler>escapecss[]] }}}>
|
||||
<<delete-tag-state-tiddlers>><$action-sendmessage $message="tm-focus-selector" $param=<<get-tagpicker-focus-selector>>/>
|
||||
</$set>
|
||||
{{$:/language/EditTemplate/Tags/Add/Button}}
|
||||
</$button>
|
||||
</$set>
|
||||
</span>
|
||||
</div>
|
||||
<div class="tc-block-dropdown-wrapper">
|
||||
<$reveal state=<<qualify "$:/state/popup/tags-auto-complete">> type="nomatch" text="" default="">
|
||||
<div class="tc-block-dropdown tc-block-tags-dropdown">
|
||||
<$set name="userInput" value={{{ [<storeTitle>get[text]] }}}>
|
||||
<$list
|
||||
filter="[<userInput>minlength{$:/config/Tags/MinLength}limit[1]]"
|
||||
emptyMessage="<div class='tc-search-results'
|
||||
>
|
||||
{{$:/language/Search/Search/TooShort}}</div>" variable="listItem">
|
||||
<$list filter=<<nonSystemTagsFilter>> variable="tag">
|
||||
<$list
|
||||
filter="[<tag>addsuffix[-primaryList]] -[<tagSelectionState>get[text]]"
|
||||
emptyMessage="<$vars button-classes='tc-btn-invisible tc-tag-button-selected' actions=<<__actions__>> tagField=<<__tagField__>> currentTiddler=<<tag>>>{{||$:/core/ui/TagPickerTagTemplate}}</$vars>"
|
||||
>
|
||||
<$vars button-classes="tc-btn-invisible"
|
||||
actions=<<__actions__>>
|
||||
tagField=<<__tagField__>>
|
||||
currentTiddler=<<tag>>
|
||||
>
|
||||
{{||$:/core/ui/TagPickerTagTemplate}}
|
||||
</$vars>
|
||||
</$list>
|
||||
</$list>
|
||||
</$list>
|
||||
<hr>
|
||||
<$list filter="[<userInput>minlength{$:/config/Tags/MinLength}limit[1]]" emptyMessage="<div class='tc-search-results'>
|
||||
{{$:/language/Search/Search/TooShort}}</div>" variable="listItem">
|
||||
<$list filter=<<systemTagsFilter>> variable="tag">
|
||||
<$list filter="[<tag>addsuffix[-secondaryList]] -[<tagSelectionState>get[text]]"
|
||||
emptyMessage="<$vars button-classes='tc-btn-invisible tc-tag-button-selected' actions=<<__actions__>> tagField=<<__tagField__>> currentTiddler=<<tag>>>{{||$:/core/ui/TagPickerTagTemplate}}</$vars>"
|
||||
>
|
||||
<$vars button-classes="tc-btn-invisible"
|
||||
actions=<<__actions__>>
|
||||
tagField=<<__tagField__>>
|
||||
currentTiddler=<<tag>>
|
||||
>
|
||||
{{||$:/core/ui/TagPickerTagTemplate}}
|
||||
</$vars>
|
||||
</$list>
|
||||
</$list>
|
||||
</$list>
|
||||
</$set>
|
||||
</div>
|
||||
</$reveal>
|
||||
</div>
|
||||
</div>
|
||||
</$vars>
|
||||
</$vars>
|
||||
</$vars>
|
||||
\end
|
||||
|
||||
\define tag-picker(actions,tagField:"tags")
|
||||
\whitespace trim
|
||||
<$vars saveTiddler=<<currentTiddler>> palette={{$:/palette}}>
|
||||
<$list filter="[<newTagNameTiddler>match[]]" emptyMessage="<$macrocall $name='tag-picker-inner' actions=<<__actions__>> tagField=<<__tagField__>>/>">
|
||||
<$set name="newTagNameTiddler" value=<<qualify "$:/temp/NewTagName">>>
|
||||
<$macrocall $name="tag-picker-inner" actions=<<__actions__>> tagField=<<__tagField__>>/>
|
||||
</$set>
|
||||
</$list>
|
||||
<$list
|
||||
filter="[<newTagNameTiddler>match[]]"
|
||||
emptyMessage="<$macrocall $name='tag-picker-inner' actions=<<__actions__>> tagField=<<__tagField__>>/>"
|
||||
>
|
||||
<$set name="newTagNameTiddler" value=<<qualify "$:/temp/NewTagName">>>
|
||||
<$macrocall $name="tag-picker-inner" actions=<<__actions__>> tagField=<<__tagField__>>/>
|
||||
</$set>
|
||||
</$list>
|
||||
</$vars>
|
||||
\end
|
||||
|
@ -7,7 +7,7 @@ tags: $:/tags/Macro
|
||||
|
||||
\define toc-caption()
|
||||
\whitespace trim
|
||||
<span class="tc-toc-caption tc-tiny-gap-left">
|
||||
<span class="tc-toc-caption">
|
||||
<$set name="tv-wikilinks" value="no">
|
||||
<$transclude field="caption">
|
||||
<$view field="title"/>
|
||||
@ -24,7 +24,7 @@ tags: $:/tags/Macro
|
||||
<$set name="excluded" filter="""[enlist<__exclude__>] [<__tag__>]""">
|
||||
<$set name="toc-item-class" filter=<<__itemClassFilter__>> emptyValue="toc-item-selected" value="toc-item">
|
||||
<li class=<<toc-item-class>>>
|
||||
<$list filter="[all[current]toc-link[no]]" emptyMessage="<$link to={{{ [<currentTiddler>get[target]else<currentTiddler>] }}}><$view field='caption'><$view field='title'/></$view></$link>">
|
||||
<$list filter="[all[current]toc-link[no]]" emptyMessage="<$link to={{{ [<currentTiddler>get[target]else<currentTiddler>] }}}><<toc-caption>></$link>">
|
||||
<<toc-caption>>
|
||||
</$list>
|
||||
<$macrocall $name="toc-body" tag=<<item>> sort=<<__sort__>> itemClassFilter=<<__itemClassFilter__>> exclude=<<excluded>> path=<<path>>/>
|
||||
|
@ -1,6 +1,6 @@
|
||||
title: HelloThere
|
||||
|
||||
This is a demo of TiddlyWiki5 incorporating a plugin for the [[D3.js]] visualization library.
|
||||
This is a demo of TiddlyWiki5 incorporating a plugin for the [[D3.js]] visualisation library.
|
||||
|
||||
! Word Cloud
|
||||
|
||||
|
@ -1,7 +1,9 @@
|
||||
{
|
||||
"description": "Deutsche Basis Edition",
|
||||
"plugins": [
|
||||
"tiddlywiki/browser-sniff"],
|
||||
"tiddlywiki/browser-sniff",
|
||||
"tiddlywiki/internals"
|
||||
],
|
||||
"themes": [
|
||||
"tiddlywiki/vanilla",
|
||||
"tiddlywiki/snowwhite",
|
||||
@ -9,8 +11,7 @@
|
||||
"tiddlywiki/seamless",
|
||||
"tiddlywiki/centralised",
|
||||
"tiddlywiki/tight",
|
||||
"tiddlywiki/readonly",
|
||||
"tiddlywiki/internals"
|
||||
"tiddlywiki/readonly"
|
||||
],
|
||||
"languages": [
|
||||
"de-AT",
|
||||
|
@ -5,7 +5,7 @@ sectionnumber: 2
|
||||
tags: section doc
|
||||
title: Microkernel Architecture
|
||||
|
||||
This section describes the architecture of the ~TiddlyWiki-kernel. ~TiddlyWiki is based on a micro-kernel which provides only a small stack of functions. This design decision was made to introduce a cleaner mechanism for customization of ~TiddlyWiki. This section also describes the data-model of ~TiddlyWiki called tiddler. And it gives a overview to the modul system which developers can use to extend the functionality of the ~TiddlyWiki application.
|
||||
This section describes the architecture of the ~TiddlyWiki-kernel. ~TiddlyWiki is based on a micro-kernel which provides only a small stack of functions. This design decision was made to introduce a cleaner mechanism for customisation of ~TiddlyWiki. This section also describes the data-model of ~TiddlyWiki called tiddler. And it gives a overview to the module system which developers can use to extend the functionality of the ~TiddlyWiki application.
|
||||
|
||||
<$list filter="[!has[draft.of]has[chapter.of]chapter.of[Microkernel Architecture]tag[doc]sort[sub.num]]">
|
||||
|
||||
|
@ -5,6 +5,6 @@ sub.num: 3
|
||||
tags: doc
|
||||
title: Syncadaptor
|
||||
|
||||
A module with ``module-type: syncadaptor`` provides functionality to get a list of tiddlers (this list is provided as ~SkinnyTiddlers, which are normal tiddlers without the text field) and to load, save and delete single tiddlers. A syncadaptor can also provide functions to login and logout so that syncadaptor modules can be used to synchronize tiddlers with a remote server.
|
||||
A module with ``module-type: syncadaptor`` provides functionality to get a list of tiddlers (this list is provided as ~SkinnyTiddlers, which are normal tiddlers without the text field) and to load, save and delete single tiddlers. A syncadaptor can also provide functions to login and logout so that syncadaptor modules can be used to synchronise tiddlers with a remote server.
|
||||
|
||||
The syncer module only uses one syncadaptor and honours a special [[system tiddler|System Tiddlers]] [[$:/config/SyncFilter]] containing a [[filter string|Tags and Filter Mechanism]]. Tiddlers matching this filter string are saved to the server with a syncadapter. It uses the [[WebServer API|https://tiddlywiki.com/#WebServer%20API%3A%20Get%20All%20Tiddlers]] to load modified tiddlers from the server, which returns only non-system tiddlers.
|
||||
|
@ -27,10 +27,10 @@ On a different level, a tiddler is also the basic unit of work for the wiki user
|
||||
This makes sense for multiple reasons:
|
||||
Because the UI of TiddlyWiki is build from tiddlers, the wiki user is able to edit the interface of his own TiddlyWiki just by editing a wiki page.
|
||||
For example to add a list of tiddler links to the sidebar, the user just needs to create a new tiddler, put the links into this tiddler and tag this tiddler with ``$:/tags/SideBar``.
|
||||
This way the user can customize his work environment just by using mechanisms he already uses to manage his wiki pages.
|
||||
This way the user can customise his work environment just by using mechanisms he already uses to manage his wiki pages.
|
||||
Tiddlers consist of fields. When using a tiddler as wiki page, the user can use these fields to store meta information, like tags.
|
||||
|
||||
Because fields for metadata and especially tags are an easy way for the user to organize his wiki pages, TiddlyWiki provides a special filter mechanism to choose tiddlers using their metadata.
|
||||
Because fields for metadata and especially tags are an easy way for the user to organise his wiki pages, TiddlyWiki provides a special filter mechanism to choose tiddlers using their metadata.
|
||||
A filter string like ``[tag[learncard]topic[math]!tag[successful]]`` would filter all tiddlers tagged with "learncard", with the value "math" in the topic-field and are not tagged with "successful".
|
||||
A user could use this filter together with the ``<$list>`` widget to display a list of all math learncards which are not yet answered successfully in a wiki page.
|
||||
|
||||
|
@ -10,7 +10,7 @@ The most practical way to develop plugins is to use Node.js with the tiddlywiki5
|
||||
|
||||
!! 1. Installation
|
||||
|
||||
First read https://tiddlywiki.com/static/PluginMechanism.html.
|
||||
First read https://tiddlywiki.com/static/PluginMechanism.html.
|
||||
|
||||
Install Git from http://git-scm.com/downloads
|
||||
|
||||
@ -85,7 +85,7 @@ For example files see the plugins in the ~TiddlyWiki5 repository i.e. those loca
|
||||
|
||||
!!5. Build your files into a ~TiddlyWiki
|
||||
|
||||
Modify `editions/tw5.com/tiddlywiki.info` to include a reference to your plugin directory, i.e. find `"plugins": [ ` and add `"yourname/pluginname"`.
|
||||
Modify `editions/tw5.com/tiddlywiki.info` to include a reference to your plugin directory, i.e. find `"plugins": [ ` and add `"yourname/pluginname"`.
|
||||
|
||||
From the TW5 directory issue the command
|
||||
|
||||
|
@ -23,7 +23,7 @@ The boot kernel includes:
|
||||
* Several short shared utility functions
|
||||
* A handful of methods implementing the module mechanism
|
||||
* The `$tw.Tiddler` class (and field definition plugins)
|
||||
* The `$tw.Wiki` class (and tiddler deserialization methods)
|
||||
* The `$tw.Wiki` class (and tiddler deserialisation methods)
|
||||
* Code for the browser to load tiddlers from the HTML DOM
|
||||
* Code for the server to load tiddlers from the file system
|
||||
|
||||
|
@ -1,6 +1,7 @@
|
||||
{
|
||||
"description": "Spanish (Spain) edition",
|
||||
"plugins": [
|
||||
"tiddlywiki/internals"
|
||||
],
|
||||
"themes": [
|
||||
"tiddlywiki/vanilla",
|
||||
@ -9,8 +10,7 @@
|
||||
"tiddlywiki/seamless",
|
||||
"tiddlywiki/centralised",
|
||||
"tiddlywiki/tight",
|
||||
"tiddlywiki/readonly",
|
||||
"tiddlywiki/internals"
|
||||
"tiddlywiki/readonly"
|
||||
],
|
||||
"languages": [
|
||||
"es-ES"
|
||||
|
@ -1,35 +0,0 @@
|
||||
caption: Beaker Browser
|
||||
color: #FF8A65
|
||||
created: 20161229121316912
|
||||
delivery: App
|
||||
description: Nouveau navigateur puissant pour Mac, Windows et Linux
|
||||
fr-title: Enregistrer avec Beaker Browser
|
||||
method: save
|
||||
modified: 20220402105820520
|
||||
tags: Saving Windows Linux Mac
|
||||
title: Saving on Beaker Browser
|
||||
type: text/vnd.tiddlywiki
|
||||
|
||||
<<.from-version "5.1.14">> <<tw>> intègre un module qui lui permet d'enregistrer les modifications directement avec [[Beaker Browser]], un navigateur internet en peer-to-peer expérimental.
|
||||
|
||||
! Instructions
|
||||
|
||||
# Téléchargez et installez Beaker Browser depuis https://beakerbrowser.com/
|
||||
# Lancez Beaker et si nécessaire ouvrez un onglet vers l'adresse `beaker:start`
|
||||
# Cliquez sur le bouton <<gf "New site">> en haut à gauche de la page
|
||||
# Saisissez les détails sur votre site
|
||||
# Cliquez sur le lien <<gf "Add files">> et sélectionnez le fichier `index.html` de votre <<tw>>
|
||||
# Naviguez sur votre site en cliquant sur le lien vers `index.html`<<;>> il devrait s'ouvrir dans un nouvel onglet
|
||||
# Essayez de créer des tiddlers et d'enregistrer les modifications
|
||||
|
||||
Jusque là, le wiki est entièrement privé et les autres utilisateurs ne peuvent pas en voir le contenu, même en connaissant l'URL. Pour le partager avec d'autres utilisateurs<<:>>
|
||||
|
||||
# Publiez vos modifications
|
||||
## Visitez la page <<gf Library>> à l'aide du menu <<gf System>> de Beaker Browser
|
||||
## Sélectionnez votre site dans la liste
|
||||
## Recherchez un encart <<gf "Unpublished changes">>. S'il n'est pas présent, passez au point suivant
|
||||
## Cliquez sur le bouton <<gf "Review changes">>
|
||||
## Cliquez sur le bouton <<gf "Publish">>
|
||||
# Partagez l'URL `dat:`
|
||||
## Copiez l'URL de votre site à partir de la barre d'adresse et partagez-la avec d'autres utilisateurs
|
||||
## Les autres utilisateurs devraient pouvoir accéder à votre site mais ils ne pourront pas le modifier avant d'en avoir fait leur propre clone
|
@ -1,6 +1,7 @@
|
||||
{
|
||||
"description": "French (France) edition",
|
||||
"plugins": [
|
||||
"tiddlywiki/internals"
|
||||
],
|
||||
"themes": [
|
||||
"tiddlywiki/vanilla",
|
||||
@ -9,8 +10,7 @@
|
||||
"tiddlywiki/seamless",
|
||||
"tiddlywiki/centralised",
|
||||
"tiddlywiki/tight",
|
||||
"tiddlywiki/readonly",
|
||||
"tiddlywiki/internals"
|
||||
"tiddlywiki/readonly"
|
||||
],
|
||||
"languages": [
|
||||
"fr-FR"
|
||||
|
@ -49,9 +49,6 @@
|
||||
],
|
||||
"build": {
|
||||
"index": [
|
||||
"--savetiddlers","[tag[external-image]]","images",
|
||||
"--setfield","[tag[external-image]]","_canonical_uri","$:/core/templates/canonical-uri-external-image","text/plain",
|
||||
"--setfield","[tag[external-image]]","text","","text/plain",
|
||||
"--rendertiddler","$:/core/save/all","index.html","text/plain"],
|
||||
"favicon": [
|
||||
"--savetiddler","$:/favicon.ico","favicon.ico",
|
||||
|
@ -1,6 +1,7 @@
|
||||
{
|
||||
"description": "Japanese (Japan) edition",
|
||||
"plugins": [
|
||||
"tiddlywiki/internals"
|
||||
],
|
||||
"themes": [
|
||||
"tiddlywiki/vanilla",
|
||||
@ -9,8 +10,7 @@
|
||||
"tiddlywiki/seamless",
|
||||
"tiddlywiki/centralised",
|
||||
"tiddlywiki/tight",
|
||||
"tiddlywiki/readonly",
|
||||
"tiddlywiki/internals"
|
||||
"tiddlywiki/readonly"
|
||||
],
|
||||
"languages": [
|
||||
"ja-JP"
|
||||
|
@ -1,4 +1,7 @@
|
||||
title: $:/DefaultTiddlers
|
||||
|
||||
[[HelloThere]]
|
||||
[[MarkdownExample]]
|
||||
$:/plugins/tiddlywiki/markdown
|
||||
[[MarkdownTutorial]]
|
||||
[[QuickDemo]]
|
||||
[[QuickDemo Source]]
|
||||
|
@ -1,11 +1,9 @@
|
||||
title: HelloThere
|
||||
|
||||
This is a demo of TiddlyWiki5 incorporating a plugin for parsing tiddlers written in the Markdown language. The plugin uses the [[Remarkable|https://github.com/jonschlinkert/remarkable]] Markdown parser internally. The MarkdownExample tiddler below is written in Markdown.
|
||||
This is a demo of TiddlyWiki5 incorporating a plugin for parsing tiddlers written in the Markdown language. The plugin uses the [[markdown-it|https://github.com/markdown-it/markdown-it]] Markdown parser internally. The MarkdownTutorial tiddler below is written in Markdown.
|
||||
|
||||
! Installation
|
||||
|
||||
To add the plugin to your own TiddlyWiki5, just drag this link to the browser window:
|
||||
|
||||
[[$:/plugins/tiddlywiki/markdown]]
|
||||
|
||||
{{$:/plugins/tiddlywiki/markdown/usage}}
|
||||
[[$:/plugins/tiddlywiki/markdown]]
|
@ -1,4 +1,4 @@
|
||||
title: MarkdownExample
|
||||
title: MarkdownTutorial
|
||||
type: text/x-markdown
|
||||
|
||||
Markdown: Basics
|
||||
@ -8,13 +8,13 @@ Getting the Gist of Markdown's Formatting Syntax
|
||||
------------------------------------------------
|
||||
|
||||
This page offers a brief overview of what it's like to use Markdown.
|
||||
The [syntax page] [s] provides complete, detailed documentation for
|
||||
The [syntax page][s] provides complete, detailed documentation for
|
||||
every feature, but Markdown should be very easy to pick up simply by
|
||||
looking at a few examples of it in action. The examples on this page
|
||||
are written in a before/after style, showing example syntax and the
|
||||
HTML output produced by Markdown.
|
||||
|
||||
It's also helpful to simply try Markdown out; the [Dingus] [d] is a
|
||||
It's also helpful to simply try Markdown out; the [Dingus][d] is a
|
||||
web application that allows you type your own Markdown-formatted text
|
||||
and translate it to XHTML.
|
||||
|
||||
@ -117,7 +117,7 @@ Output:
|
||||
|
||||
Unordered (bulleted) lists use asterisks, pluses, and hyphens (`*`,
|
||||
`+`, and `-`) as list markers. These three markers are
|
||||
interchangable; this:
|
||||
interchangeable; this:
|
||||
|
||||
* Candy.
|
||||
* Gum.
|
||||
@ -264,7 +264,7 @@ it easy to use Markdown to write about HTML example code:
|
||||
I strongly recommend against using any `<blink>` tags.
|
||||
|
||||
I wish SmartyPants used named entities like `—`
|
||||
instead of decimal-encoded entites like `—`.
|
||||
instead of decimal-encoded entities like `—`.
|
||||
|
||||
Output:
|
||||
|
||||
@ -273,7 +273,7 @@ Output:
|
||||
|
||||
<p>I wish SmartyPants used named entities like
|
||||
<code>&mdash;</code> instead of decimal-encoded
|
||||
entites like <code>&#8212;</code>.</p>
|
||||
entities like <code>&#8212;</code>.</p>
|
||||
|
||||
|
||||
To specify an entire block of pre-formatted code, indent every line of
|
220
editions/markdowndemo/tiddlers/QuickDemo.tid
Normal file
220
editions/markdowndemo/tiddlers/QuickDemo.tid
Normal file
@ -0,0 +1,220 @@
|
||||
title: QuickDemo
|
||||
type: text/markdown
|
||||
|
||||
<style>
|
||||
.tc-image-loaded {
|
||||
width: 35%;
|
||||
}
|
||||
</style>
|
||||
# h1 Heading
|
||||
## h2 Heading
|
||||
### h3 Heading
|
||||
#### h4 Heading
|
||||
##### h5 Heading
|
||||
###### h6 Heading
|
||||
|
||||
|
||||
## Horizontal Rules
|
||||
|
||||
____
|
||||
|
||||
---
|
||||
|
||||
****
|
||||
|
||||
|
||||
## Emphasis
|
||||
|
||||
|
||||
**This is bold text**
|
||||
|
||||
__This is bold text__
|
||||
|
||||
*This is italic text*
|
||||
|
||||
_This is italic text_
|
||||
|
||||
~~Strikethrough~~
|
||||
|
||||
|
||||
## Blockquotes
|
||||
|
||||
|
||||
> Blockquotes can also be nested...
|
||||
>> ...by using additional greater-than signs right next to each other...
|
||||
> > > ...or with spaces between arrows.
|
||||
|
||||
|
||||
## Unordered List
|
||||
|
||||
|
||||
+ Create a list by starting a line with `+`, `-`, or `*`
|
||||
+ Sub-lists are made by indenting 2 spaces:
|
||||
- Marker character change forces new list start:
|
||||
* Ac tristique libero volutpat at
|
||||
+ Facilisis in pretium nisl aliquet
|
||||
- Nulla volutpat aliquam velit
|
||||
+ Very easy!
|
||||
|
||||
|
||||
## Ordered List
|
||||
|
||||
|
||||
1. Lorem ipsum dolor sit amet
|
||||
2. Consectetur adipiscing elit
|
||||
3. Integer molestie lorem at massa
|
||||
|
||||
|
||||
1. You can use sequential numbers...
|
||||
1. ...or keep all the numbers as `1.`
|
||||
|
||||
Start numbering with offset:
|
||||
|
||||
57. foo
|
||||
1. bar
|
||||
|
||||
|
||||
## Code
|
||||
|
||||
|
||||
Inline `code`
|
||||
|
||||
Indented code
|
||||
|
||||
// Some comments
|
||||
line 1 of code
|
||||
line 2 of code
|
||||
line 3 of code
|
||||
|
||||
Block code "fences"
|
||||
|
||||
```
|
||||
Sample text here...
|
||||
```
|
||||
|
||||
|
||||
## Syntax highlighting
|
||||
|
||||
``` js
|
||||
var foo = function (bar) {
|
||||
return bar++;
|
||||
};
|
||||
|
||||
console.log(foo(5));
|
||||
```
|
||||
|
||||
|
||||
## ~KaTeX
|
||||
|
||||
|
||||
Equation $c = \pm\sqrt{a^2 + b^2}$ is typeset in inline mode.
|
||||
|
||||
Display style: $$c = \pm\sqrt{a^2 + b^2}$$
|
||||
|
||||
|
||||
## Tables
|
||||
|
||||
|
||||
| Attribute | Description |
|
||||
| --------- | ----------- |
|
||||
| multiple | select multiple files to download |
|
||||
| param | parameter to be passed with the message |
|
||||
| tooltip | optional tooltip text |
|
||||
|
||||
Aligning columns:
|
||||
|
||||
| Column A | Column B | Column C |
|
||||
| :---- | :----: | ----: |
|
||||
| is | is | is |
|
||||
| left | nicely | right |
|
||||
| aligned | centered | aligned |
|
||||
|
||||
|
||||
## Links
|
||||
|
||||
|
||||
[link text](http://google.com)
|
||||
|
||||
[link with title](http://nodeca.github.io/pica/demo/ "title text!")
|
||||
|
||||
link to tiddler [QuickDemo Source](#QuickDemo%20Source)
|
||||
|
||||
URL can contain spaces if enclosed in brackets `<>`: [QuickDemo Source](<#QuickDemo Source>)
|
||||
|
||||
|
||||
## Images
|
||||
|
||||
|
||||
![Minion](https://octodex.github.com/images/minion.png)
|
||||
![Stormtroopocat](https://octodex.github.com/images/stormtroopocat.jpg "The Stormtroopocat")
|
||||
|
||||
Like links, images also have a reference style syntax
|
||||
|
||||
![Alt text][id]
|
||||
|
||||
with a link reference defined later in the document.
|
||||
|
||||
[id]: https://octodex.github.com/images/dojocat.jpg "The Dojocat"
|
||||
|
||||
|
||||
## Subscript & Superscript
|
||||
|
||||
|
||||
- 19^th^
|
||||
- H~2~O
|
||||
|
||||
|
||||
## \<ins\>
|
||||
|
||||
|
||||
++Inserted text++
|
||||
|
||||
|
||||
## \<mark\>
|
||||
|
||||
|
||||
==Marked text==
|
||||
|
||||
|
||||
## Footnotes
|
||||
|
||||
|
||||
Footnote 1 link[^first].
|
||||
|
||||
Footnote 2 link[^second].
|
||||
|
||||
Inline footnote^[Text of inline footnote] definition.
|
||||
|
||||
Duplicated footnote reference[^second].
|
||||
|
||||
[^first]: Footnote **can have markup**
|
||||
|
||||
and multiple paragraphs.
|
||||
|
||||
[^second]: Footnote text.
|
||||
|
||||
|
||||
## Definition Lists
|
||||
|
||||
|
||||
Term 1
|
||||
|
||||
: Definition 1
|
||||
with lazy continuation.
|
||||
|
||||
Term 2 with *inline markup*
|
||||
|
||||
: Definition 2
|
||||
|
||||
{ some code, part of Definition 2 }
|
||||
|
||||
Third paragraph of definition 2.
|
||||
|
||||
_Compact style:_
|
||||
|
||||
Term 1
|
||||
~ Definition 1
|
||||
|
||||
Term 2
|
||||
~ Definition 2a
|
||||
~ Definition 2b
|
5
editions/markdowndemo/tiddlers/QuickDemoSource.tid
Normal file
5
editions/markdowndemo/tiddlers/QuickDemoSource.tid
Normal file
@ -0,0 +1,5 @@
|
||||
title: QuickDemo Source
|
||||
|
||||
<$let tiddler="QuickDemo">
|
||||
<$codeblock code={{{ [<tiddler>get[text]] }}} language={{{ [<tiddler>get[type]else[text/vnd.tiddlywiki]] }}}/>
|
||||
</$let>
|
@ -1,7 +1,9 @@
|
||||
{
|
||||
"description": "Demo of the Markdown plugin",
|
||||
"plugins": [
|
||||
"tiddlywiki/markdown"
|
||||
"tiddlywiki/markdown",
|
||||
"tiddlywiki/highlight",
|
||||
"tiddlywiki/katex"
|
||||
],
|
||||
"themes": [
|
||||
"tiddlywiki/vanilla",
|
||||
|
@ -1,23 +1,31 @@
|
||||
caption: 5.2.6
|
||||
created: 20221219172444961
|
||||
modified: 20221219172444961
|
||||
created: 20230119221001957
|
||||
modified: 20230119221001957
|
||||
tags: ReleaseNotes
|
||||
title: Release 5.2.6
|
||||
type: text/vnd.tiddlywiki
|
||||
|
||||
//[[See GitHub for detailed change history of this release|https://github.com/Jermolene/TiddlyWiki5/compare/v5.2.5...master]]//
|
||||
|
||||
! Major Improvements
|
||||
|
||||
! Translation Improvements
|
||||
|
||||
Improvements to the following translations:
|
||||
|
||||
*
|
||||
* Chinese
|
||||
* Italian
|
||||
|
||||
! Plugin Improvements
|
||||
|
||||
* <<.link-badge-updated "https://github.com/Jermolene/TiddlyWiki5/pull/6528">> the [[Markdown Plugin]] to use the newer and better maintained [[markdown-it|https://github.com/markdown-it/markdown-it]] library. The previous Markdown plugin remains available as "markdown-legacy"
|
||||
* <<.link-badge-fixed "https://github.com/Jermolene/TiddlyWiki5/pull/7176">> [[Innerwiki Plugin]] to allow the `<$data>` widget to override existing tiddler fields
|
||||
* <<.link-badge-fixed "https://github.com/Jermolene/TiddlyWiki5/pull/7207">>, <<.link-badge-here "https://github.com/Jermolene/TiddlyWiki5/commit/c39ef398bffae12c0ed7324d9b6d9d29f0f2f9ff">> and <<.link-badge-here "https://github.com/Jermolene/TiddlyWiki5/commit/8f7441f296351a4dd0852c3c782f8874d398e052">> problem preventing [[Share Plugin]] from working properly
|
||||
|
||||
|
||||
! Usability Improvements
|
||||
|
||||
*
|
||||
* <<.link-badge-improved "https://github.com/Jermolene/TiddlyWiki5/pull/7217">> consistency of tiddler deletion by allowing missing tiddlers to be 'deleted', which just results in them being closed
|
||||
* <<.link-badge-improved "https://github.com/Jermolene/TiddlyWiki5/commit/34643a42790777f1b235f57b5093bb29bd0b3a14">> layout switcher to include an optional icon for each layout
|
||||
* <<.link-badge-removed "https://github.com/Jermolene/TiddlyWiki5/commit/c0615e20ecf7d5d5e66d8a2acd28b80e8d59688d">> [[improvements to table layout|https://github.com/Jermolene/TiddlyWiki5/pull/7010]] from v5.2.5 that have proved to not be backwards compatible
|
||||
|
||||
! Widget Improvements
|
||||
|
||||
@ -25,19 +33,35 @@ Improvements to the following translations:
|
||||
|
||||
! Filter improvements
|
||||
|
||||
*
|
||||
* <<.link-badge-extended "https://github.com/Jermolene/TiddlyWiki5/pull/7121">> [[encodeuricomponent Operator]] to encode characters such as `*` that are illegal in Windows filenames
|
||||
|
||||
! Hackability Improvements
|
||||
|
||||
*
|
||||
* <<.link-badge-extended "https://github.com/Jermolene/TiddlyWiki5/pull/7185">> the [[pragma|Pragma]] syntax to allow them to be indented with whitespace
|
||||
* <<.link-badge-improved "https://github.com/Jermolene/TiddlyWiki5/pull/7118">> readability of [[tag-picker Macro]] and [[keyboard-driven-input Macro]]
|
||||
* <<.link-badge-improved "https://github.com/Jermolene/TiddlyWiki5/pull/7129">> reliability of [[list-links-draggable Macro]] and [[list-tagged-draggable Macro]] by using the new GenesisWidget instead of textual substitution
|
||||
* <<.link-badge-improved "https://github.com/Jermolene/TiddlyWiki5/pull/7210">> [[external JavaScript core support|Using the external JavaScript template]] to make it possible to save an external JS wiki as a standard single file wiki
|
||||
|
||||
! Bug Fixes
|
||||
|
||||
*
|
||||
* <<.link-badge-fixed "https://github.com/Jermolene/TiddlyWiki5/pull/6622">> bug with the DropzoneWidget that prevented all the available formats being pasted
|
||||
* <<.link-badge-updated "https://github.com/Jermolene/TiddlyWiki5/pull/7102">> PDF rendering to use an `<iframe>` instead of the older `<embed>`
|
||||
* <<.link-badge-fixed "https://github.com/Jermolene/TiddlyWiki5/commit/8ef6d78beffb6496fe5daa2c81a529a79046ba3c">> issue with `.tid` files with fieldnames containing hash characters by saving such tiddlers in `.json` format
|
||||
* <<.link-badge-fixed "https://github.com/Jermolene/TiddlyWiki5/pull/7121">> (and <<.link-badge-here "https://github.com/Jermolene/TiddlyWiki5/pull/7219">>) overriding `toc-caption` macro for [[Table-of-Contents Macros]]
|
||||
* <<.link-badge-fixed "https://github.com/Jermolene/TiddlyWiki5/pull/7212">> rendering of $:/core/ui/MoreSideBar/Tags when viewed within the story river
|
||||
* <<.link-badge-fixed "https://github.com/Jermolene/TiddlyWiki5/pull/7156">> undefined variable crash in [[reduce Operator]], [[filter Operator]] and [[sortsub Operator]]
|
||||
* <<.link-badge-fixed "https://github.com/Jermolene/TiddlyWiki5/issues/7153">> GenesisWidget not to create anything if the `$type` attribute is blank or missing
|
||||
* <<.link-badge-fixed "https://github.com/Jermolene/TiddlyWiki5/issues/7160">> crash using [[jsonget Operator]] with "fixed" as key name
|
||||
* <<.link-badge-fixed "https://github.com/Jermolene/TiddlyWiki5/commit/0b39e47ce88c7620b7a66c1553a71efaff06edb9">> importing of MP3 files to match current browser implementations
|
||||
* <<.link-badge-fixed "https://github.com/Jermolene/TiddlyWiki5/pull/7122">> crash when attempting to create an element with a blank tag name
|
||||
|
||||
! Node.js Improvements
|
||||
|
||||
*
|
||||
* <<.link-badge-added "https://github.com/Jermolene/TiddlyWiki5/pull/7169">> integration between the [[BrowserStorage Plugin]] and the client-server configuration to allow changes to be made while offline and then later resynchronised with the server
|
||||
* <<.link-badge-fixed "https://github.com/Jermolene/TiddlyWiki5/pull/7130">> duplicate fields in internal templates used in client-server configuration
|
||||
* <<.link-badge-fixed "https://github.com/Jermolene/TiddlyWiki5/issues/7138">> lazy loading not triggering a sync from the server
|
||||
* <<.link-badge-fixed "https://github.com/Jermolene/TiddlyWiki5/commit/bf8e1ca5b0587787bf80692b0213bb7b038c7868">> crash on creating a new tiddler if anonymous users manage to create syncable tiddlers in a read only wiki
|
||||
* <<.link-badge-improved "https://github.com/Jermolene/TiddlyWiki5/commit/95e61688397ff1bc9be04193bc4ce2e3c8c48dce">> handling of logout in the client-server configuration to avoid 404 errors
|
||||
|
||||
! Performance Improvements
|
||||
|
||||
@ -48,4 +72,26 @@ 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:
|
||||
|
||||
<<.contributors """
|
||||
AnthonyMuscio
|
||||
BramChen
|
||||
btheado
|
||||
cdruan
|
||||
CrossEye
|
||||
cs8425
|
||||
fkmiec
|
||||
flibbles
|
||||
GameDungeon
|
||||
jeffrey4l
|
||||
joebordes
|
||||
kookma
|
||||
m42e
|
||||
Marxsal
|
||||
newmedicine
|
||||
pippep
|
||||
pmario
|
||||
saqimtiaz
|
||||
Telumire
|
||||
twMat
|
||||
wincentbalin
|
||||
yaisog
|
||||
""">>
|
||||
|
@ -15,7 +15,7 @@ You can have multiple template tiddlers that use the same input and options tidd
|
||||
|
||||
!!Display tiddler
|
||||
|
||||
This is the container used to display the section in the résumé itself, there isn't any customization here.
|
||||
This is the container used to display the section in the résumé itself, there isn't any customisation here.
|
||||
|
||||
''Required tags'': `Section Display`<br>
|
||||
''Required name format'': `$:/display/(section name) Display`<br>
|
||||
|
19
editions/test/tiddlers/tests/data/filters/Base64.tid
Normal file
19
editions/test/tiddlers/tests/data/filters/Base64.tid
Normal file
@ -0,0 +1,19 @@
|
||||
title: Filters/Base64
|
||||
description: Test {encode|decode}base64 operators
|
||||
type: text/vnd.tiddlywiki-multiple
|
||||
tags: [[$:/tags/wiki-test-spec]]
|
||||
|
||||
title: Output
|
||||
|
||||
\whitespace trim
|
||||
(<$text text={{{ [[Jeremy1234]encodebase64[]] }}}/>)
|
||||
(<$text text={{{ [[]encodebase64[]] }}}/>)
|
||||
(<$text text={{{ [[SmVyZW15MTIzNA==]decodebase64[]] }}}/>)
|
||||
(<$text text={{{ [[]decodebase64[]] }}}/>)
|
||||
+
|
||||
title: ExpectedResult
|
||||
|
||||
<p>(SmVyZW15MTIzNA==)
|
||||
()
|
||||
(Jeremy1234)
|
||||
()</p>
|
30
editions/test/tiddlers/tests/data/genesis-widget/Block.tid
Normal file
30
editions/test/tiddlers/tests/data/genesis-widget/Block.tid
Normal file
@ -0,0 +1,30 @@
|
||||
title: Genesis/Block
|
||||
description: genesis widget distinguishes between block and inline
|
||||
type: text/vnd.tiddlywiki-multiple
|
||||
tags: [[$:/tags/wiki-test-spec]]
|
||||
|
||||
title: Output
|
||||
|
||||
\whitespace trim
|
||||
<$genesis $type="$reveal" type=nomatch>
|
||||
|
||||
Block
|
||||
</$genesis>
|
||||
|
||||
<$genesis $type="$reveal" type=nomatch $mode=block>
|
||||
|
||||
Block forced block
|
||||
</$genesis>
|
||||
|
||||
<$genesis $type="$reveal" type=nomatch $mode=inline>
|
||||
|
||||
Block forced inline
|
||||
</$genesis>
|
||||
|
||||
<$genesis $type=$reveal type=nomatch>Inline</$genesis>
|
||||
<$genesis $type=$reveal type=nomatch $mode=block>Inline forced block</$genesis>
|
||||
<$genesis $type=$reveal type=nomatch $mode=inline>Inline forced inline</$genesis>
|
||||
+
|
||||
title: ExpectedResult
|
||||
|
||||
<div class=" tc-reveal"><p>Block</p></div><div class=" tc-reveal"><p>Block forced block</p></div><span class=" tc-reveal"><p>Block forced inline</p></span><p><span class=" tc-reveal">Inline</span><div class=" tc-reveal">Inline forced block</div><span class=" tc-reveal">Inline forced inline</span></p>
|
@ -0,0 +1,36 @@
|
||||
title: Macros/NestedMacros-indented
|
||||
description: Nested Macros-indented
|
||||
type: text/vnd.tiddlywiki-multiple
|
||||
tags: [[$:/tags/wiki-test-spec]]
|
||||
|
||||
title: Output
|
||||
|
||||
\whitespace trim
|
||||
|
||||
\define outer()
|
||||
\whitespace trim
|
||||
|
||||
\define middle()
|
||||
\whitespace trim
|
||||
|
||||
\define inner()
|
||||
\whitespace trim
|
||||
|
||||
Jaguar
|
||||
|
||||
\end inner
|
||||
|
||||
<<inner>>
|
||||
|
||||
\end middle
|
||||
|
||||
<<middle>>
|
||||
|
||||
\end outer
|
||||
|
||||
<<outer>>
|
||||
|
||||
+
|
||||
title: ExpectedResult
|
||||
|
||||
<p>Jaguar</p>
|
@ -0,0 +1,36 @@
|
||||
title: Macros/NestedMacros-indented2
|
||||
description: Nested Macros-indented with spaces
|
||||
type: text/vnd.tiddlywiki-multiple
|
||||
tags: [[$:/tags/wiki-test-spec]]
|
||||
|
||||
title: Output
|
||||
|
||||
\whitespace trim
|
||||
|
||||
\define outer()
|
||||
\whitespace trim
|
||||
|
||||
\define middle()
|
||||
\whitespace trim
|
||||
|
||||
\define inner()
|
||||
\whitespace trim
|
||||
|
||||
Jaguar
|
||||
|
||||
\end inner
|
||||
|
||||
<<inner>>
|
||||
|
||||
\end middle
|
||||
|
||||
<<middle>>
|
||||
|
||||
\end outer
|
||||
|
||||
<<outer>>
|
||||
|
||||
+
|
||||
title: ExpectedResult
|
||||
|
||||
<p>Jaguar</p>
|
@ -0,0 +1,35 @@
|
||||
title: Message/tm-import-tiddlers/CustomTitle
|
||||
description: tm-import-tiddlers message can import to a tiddler with a custom title
|
||||
type: text/vnd.tiddlywiki-multiple
|
||||
tags: [[$:/tags/wiki-test-spec]]
|
||||
|
||||
title: Output
|
||||
|
||||
text: <$text text={{MyCustomTitle}}/>
|
||||
plugin-type: <$text text={{MyCustomTitle!!plugin-type}}/>
|
||||
~$:/StoryList: <$text text={{$:/StoryList!!list}}/>
|
||||
+
|
||||
title: Actions
|
||||
|
||||
<$navigator story="$:/StoryList">
|
||||
<$action-sendmessage
|
||||
$message="tm-import-tiddlers"
|
||||
$param='[{"title": "Elephants"}, {"title": "Eagles"}]'
|
||||
importTitle=MyCustomTitle/>
|
||||
</$navigator>
|
||||
|
||||
+
|
||||
title: ExpectedResult
|
||||
|
||||
<p>text: {
|
||||
"tiddlers": {
|
||||
"Elephants": {
|
||||
"title": "Elephants"
|
||||
},
|
||||
"Eagles": {
|
||||
"title": "Eagles"
|
||||
}
|
||||
}
|
||||
}
|
||||
plugin-type: import
|
||||
$:/StoryList: MyCustomTitle</p>
|
@ -0,0 +1,35 @@
|
||||
title: Message/tm-import-tiddlers/NoAutoOpen
|
||||
description: tm-import-tiddlers can import without automatically opening the import tiddler
|
||||
type: text/vnd.tiddlywiki-multiple
|
||||
tags: [[$:/tags/wiki-test-spec]]
|
||||
|
||||
title: Output
|
||||
|
||||
text: <$text text={{$:/Import}}/>
|
||||
plugin-type: <$text text={{$:/Import!!plugin-type}}/>
|
||||
~$:/StoryList: <$text text={{$:/StoryList!!list}}/>
|
||||
+
|
||||
title: Actions
|
||||
|
||||
<$navigator story="$:/StoryList">
|
||||
<$action-sendmessage
|
||||
$message="tm-import-tiddlers"
|
||||
$param='[{"title": "Elephants"}, {"title": "Eagles"}]'
|
||||
autoOpenOnImport=no/>
|
||||
</$navigator>
|
||||
|
||||
+
|
||||
title: ExpectedResult
|
||||
|
||||
<p>text: {
|
||||
"tiddlers": {
|
||||
"Elephants": {
|
||||
"title": "Elephants"
|
||||
},
|
||||
"Eagles": {
|
||||
"title": "Eagles"
|
||||
}
|
||||
}
|
||||
}
|
||||
plugin-type: import
|
||||
$:/StoryList: </p>
|
@ -0,0 +1,36 @@
|
||||
title: Message/tm-import-tiddlers/NoAutoOpenViaVar
|
||||
description: tm-import-tiddlers can import and open based on tv-auto-open-on-import
|
||||
type: text/vnd.tiddlywiki-multiple
|
||||
tags: [[$:/tags/wiki-test-spec]]
|
||||
|
||||
title: Output
|
||||
|
||||
text: <$text text={{$:/Import}}/>
|
||||
plugin-type: <$text text={{$:/Import!!plugin-type}}/>
|
||||
~$:/StoryList: <$text text={{$:/StoryList!!list}}/>
|
||||
+
|
||||
title: Actions
|
||||
|
||||
<$let tv-auto-open-on-import="no">
|
||||
<$navigator story="$:/StoryList">
|
||||
<$action-sendmessage
|
||||
$message="tm-import-tiddlers"
|
||||
$param='[{"title": "Elephants"}, {"title": "Eagles"}]'/>
|
||||
</$navigator>
|
||||
</$let>
|
||||
|
||||
+
|
||||
title: ExpectedResult
|
||||
|
||||
<p>text: {
|
||||
"tiddlers": {
|
||||
"Elephants": {
|
||||
"title": "Elephants"
|
||||
},
|
||||
"Eagles": {
|
||||
"title": "Eagles"
|
||||
}
|
||||
}
|
||||
}
|
||||
plugin-type: import
|
||||
$:/StoryList: </p>
|
@ -0,0 +1,34 @@
|
||||
title: Message/tm-import-tiddlers/default
|
||||
description: tm-import-tiddlers message by default should import to $:/Import and open the tiddler
|
||||
type: text/vnd.tiddlywiki-multiple
|
||||
tags: [[$:/tags/wiki-test-spec]]
|
||||
|
||||
title: Output
|
||||
|
||||
text: <$text text={{$:/Import}}/>
|
||||
plugin-type: <$text text={{$:/Import!!plugin-type}}/>
|
||||
~$:/StoryList: <$text text={{$:/StoryList!!list}}/>
|
||||
+
|
||||
title: Actions
|
||||
|
||||
<$navigator story="$:/StoryList">
|
||||
<$action-sendmessage
|
||||
$message="tm-import-tiddlers"
|
||||
$param='[{"title": "Elephants"}, {"title": "Eagles"}]'/>
|
||||
</$navigator>
|
||||
|
||||
+
|
||||
title: ExpectedResult
|
||||
|
||||
<p>text: {
|
||||
"tiddlers": {
|
||||
"Elephants": {
|
||||
"title": "Elephants"
|
||||
},
|
||||
"Eagles": {
|
||||
"title": "Eagles"
|
||||
}
|
||||
}
|
||||
}
|
||||
plugin-type: import
|
||||
$:/StoryList: $:/Import</p>
|
@ -0,0 +1,36 @@
|
||||
title: Pragmas/Parsermode-indented
|
||||
description: parsermode pragma
|
||||
type: text/vnd.tiddlywiki-multiple
|
||||
tags: [[$:/tags/wiki-test-spec]]
|
||||
|
||||
title: Output
|
||||
|
||||
{{AlwaysInline}}
|
||||
|
||||
{{AlwaysBlock}}
|
||||
|
||||
{{AlwaysInline}}{{AlwaysBlock}}
|
||||
|
||||
+
|
||||
title: AlwaysInline
|
||||
|
||||
\parsermode inline
|
||||
! Not Heading
|
||||
|
||||
Text with ''bold''
|
||||
+
|
||||
title: AlwaysBlock
|
||||
|
||||
\parsermode block
|
||||
! Heading
|
||||
|
||||
Text with ''bold''
|
||||
+
|
||||
title: ExpectedResult
|
||||
|
||||
! Not Heading
|
||||
|
||||
Text with <strong>bold</strong><h1 class="">Heading</h1><p>Text with <strong>bold</strong></p><p>! Not Heading
|
||||
|
||||
Text with <strong>bold</strong><h1 class="">Heading</h1><p>Text with <strong>bold</strong></p>
|
||||
</p>
|
@ -1107,6 +1107,10 @@ Tests the filtering mechanism.
|
||||
{ name: '', params: [] }
|
||||
);
|
||||
});
|
||||
|
||||
it("should handle the encodeuricomponent and decodeuricomponent operators", function() {
|
||||
expect(wiki.filterTiddlers("[[<>:\"/\\|?*]encodeuricomponent[]]").join(",")).toBe("%3C%3E%3A%22%2F%5C%7C%3F%2A");
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
|
@ -268,7 +268,7 @@ describe("Widget module", function() {
|
||||
expect(wrapper.innerHTML).toBe("<p>Happy Result</p>");
|
||||
|
||||
// This is important. $Let needs to be aware enough not to let its
|
||||
// own variables interfere with its ability to recognize no change.
|
||||
// own variables interfere with its ability to recognise no change.
|
||||
// Doesn't matter that nothing has changed, we just need to make sure
|
||||
// it recognizes that that its outward facing variables are unchanged
|
||||
// EVEN IF some intermediate variables did change, there's no need to
|
||||
|
@ -43,7 +43,7 @@ describe("WikiText tests", function() {
|
||||
expect(wiki.renderTiddler("text/html","TiddlerThree")).toBe("<p>The speed of sound</p><p>The light of speed</p>");
|
||||
});
|
||||
it("should support attributes specified as macro invocations", function() {
|
||||
expect(wiki.renderTiddler("text/html","TiddlerFour")).toBe("<p><a class=\"tc-tiddlylink tc-tiddlylink-missing\" href=\"#This%20is%20my%20''amazingly''%20groovy%20macro!\">This is a link</a></p>");
|
||||
expect(wiki.renderTiddler("text/html","TiddlerFour")).toBe("<p><a class=\"tc-tiddlylink tc-tiddlylink-missing\" href=\"#This%20is%20my%20%27%27amazingly%27%27%20groovy%20macro%21\">This is a link</a></p>");
|
||||
});
|
||||
it("should identify wikiwords to automatically link", function() {
|
||||
expect(wiki.renderText("text/html","text/vnd-tiddlywiki","No wikilinks here").indexOf("<a") !== -1).toBe(false);
|
||||
|
@ -1,8 +1,9 @@
|
||||
created: 20210101162308245
|
||||
modified: 20210101201435693
|
||||
modified: 20230110220417543
|
||||
tags: [[Community Editions]]
|
||||
title: "TiddlyResearch" by Kebi
|
||||
url: https://kebifurai.github.io/TiddlyResearch/
|
||||
title: "TiddlyStudy" by Kebi
|
||||
type: text/vnd.tiddlywiki
|
||||
url: https://postkevone.github.io/tiddlystudy/
|
||||
|
||||
A adaptation of TiddlyWiki perfect for using as a Notebook sysetem.
|
||||
|
@ -1,7 +1,7 @@
|
||||
title: Open Collective
|
||||
modified: 20221204165636777
|
||||
created: 20221204165636777
|
||||
tags: About HelloThere [[Open Collective]]
|
||||
tags: About HelloThere
|
||||
|
||||
Open Collective is a platform for transparent fundraising and expenses for projects like TiddlyWiki. It is the official TiddlyWiki community fundraising space.
|
||||
|
||||
|
@ -0,0 +1,6 @@
|
||||
title: TiddlyWiki Newsletter
|
||||
|
||||
Subscribe to the ~TiddlyWiki Newsletter here:
|
||||
|
||||
<iframe src="https://tiddlywiki.substack.com/embed" width="480" height="320" style="border:1px solid #EEE; background:white;" frameborder="0" scrolling="no"></iframe>
|
||||
|
@ -1,15 +1,16 @@
|
||||
created: 20210101161529206
|
||||
modified: 20210101201435693
|
||||
modified: 20230110220010665
|
||||
tags: [[Community Editions]]
|
||||
title: "Drift - Collect, Organise, Grow." by Tony K
|
||||
url: https://akhater.github.io/drift/
|
||||
type: text/vnd.tiddlywiki
|
||||
url: https://github.com/bmann/drift-tiddlywiki-template/tree/master/drift
|
||||
|
||||
A adaptation of TiddlyWiki perfect for using as a Notebook sysetem.
|
||||
|
||||
{{!!url}}
|
||||
|
||||
<<<
|
||||
Drift is an adaptation of TiddlyWiki with the goal of helping you Collect. Organize. and Grow. your ideas while keeping tab on how they interconnect together and fluidly Drift from one to another.
|
||||
Drift is an adaptation of TiddlyWiki with the goal of helping you Collect. Organise. and Grow. your ideas while keeping tab on how they interconnect together and fluidly Drift from one to another.
|
||||
|
||||
The 2 main components of Drift are TWCrosslinks and DailyNotes so you never miss an idea
|
||||
|
||||
|
@ -11,7 +11,7 @@ title: "Noteself" by Danielo Rodríguez
|
||||
type: text/vnd.tiddlywiki
|
||||
url: https://noteself.github.io/
|
||||
|
||||
~NoteSelf is your personal, private, customizable, Evernote-like experience.
|
||||
~NoteSelf is your personal, private, customisable, Evernote-like experience.
|
||||
You want cloud? Fine! You don't? Fine too! It's all yours, It's your decision!
|
||||
Why not be a bit selfish?
|
||||
|
||||
@ -26,9 +26,9 @@ You already know and love Evernote, we know it. It is comfortable, it syncs, has
|
||||
Wow, it's almost perfect, but what about:
|
||||
|
||||
* Privacy - Everything is stored on the Evernote's servers!
|
||||
* Customization - If you don't like the interface of Evernote, there's nothing you can do
|
||||
* Customisation - If you don't like the interface of Evernote, there's nothing you can do
|
||||
|
||||
~NoteSelf is built on top of ~TiddlyWiki, a powerful, free, highly customizable and open-source personal wiki.
|
||||
We took the best of it, it's powerful customization system, and mixed it with one of the best
|
||||
embedded databases available, [[PouchDb|http://www.pouchdb.com]], for bringing the synchronization capabilities you need.
|
||||
~NoteSelf is built on top of ~TiddlyWiki, a powerful, free, highly customisable and open-source personal wiki.
|
||||
We took the best of it, it's powerful customisation system, and mixed it with one of the best
|
||||
embedded databases available, [[PouchDb|http://www.pouchdb.com]], for bringing the synchronisation capabilities you need.
|
||||
<<<
|
||||
|
@ -11,7 +11,7 @@ A thesis notebook based on TiddlyWiki.
|
||||
<<<
|
||||
This is an example of a thesis notebook powered by TiddlyWiki 5.0.8-beta.
|
||||
|
||||
TiddlyWiki is a great piece of software created by Jeremy Ruston. It allows you, among other things, to take notes, organize ideas, store information, and display all your stuff the way you want. It is an incredibly flexible tool you can adapt to fit almost all your needs.
|
||||
TiddlyWiki is a great piece of software created by Jeremy Ruston. It allows you, among other things, to take notes, organise ideas, store information, and display all your stuff the way you want. It is an incredibly flexible tool you can adapt to fit almost all your needs.
|
||||
|
||||
This TiddlyWiki has been customized to serve as a philosophy notebook centered around authors, books and papers, concepts and theories, and personal notes. I use it along with Zotero, which is a dedicated bibliography software. Both are free, open source projects. TiddlyWiki can be downloaded at https://tiddlywiki.com.
|
||||
<<<
|
||||
|
@ -12,11 +12,11 @@ A collection of plugins from TheDiveO.
|
||||
[[TheDiveO's Third Flow|http://thediveo.github.io/ThirdFlow/]] plugin construction system:
|
||||
|
||||
<<<
|
||||
The ~ThirdFlow plugin brings to you another way to develop customization plugins for TiddlyWiki 5. It is not enforcing a specific development flow, it simply tries to help you. Otherwise, it tries to stay out of your way.
|
||||
The ~ThirdFlow plugin brings to you another way to develop customisation plugins for TiddlyWiki 5. It is not enforcing a specific development flow, it simply tries to help you. Otherwise, it tries to stay out of your way.
|
||||
<<<
|
||||
|
||||
[[TheDiveO's FontAwesome|http://thediveo.github.io/TW5FontAwesome/]] plugin:
|
||||
|
||||
<<<
|
||||
The FontAwesome plugin supports embedding Font Awesome in TiddlyWiki 5. There is no need to install this font into your operating system in order to use it with TiddlyWiki 5. The font is already embedded in this TiddlyWiki 5 customization plugin instead, so nothing else to install.
|
||||
The FontAwesome plugin supports embedding Font Awesome in TiddlyWiki 5. There is no need to install this font into your operating system in order to use it with TiddlyWiki 5. The font is already embedded in this TiddlyWiki 5 customisation plugin instead, so nothing else to install.
|
||||
<<<
|
||||
|
@ -9,7 +9,7 @@ Shiraz plugin is a very small in size and framework to create stylish contents i
|
||||
|
||||
{{!!url}}
|
||||
|
||||
Shiraz plugin contains extended markups, macros, styles, and many customization to empty Tiddlywiki and can be used as a ''starter kit''.
|
||||
Shiraz plugin contains extended markups, macros, styles, and many customisation to empty Tiddlywiki and can be used as a ''starter kit''.
|
||||
|
||||
Some of Shiraz features are:
|
||||
|
||||
@ -18,7 +18,7 @@ Some of Shiraz features are:
|
||||
* Sortable tables
|
||||
* Display on demand, slider, and details
|
||||
* Images, basic image macros, slidein, and overlay images, polaroid and pretty images
|
||||
* Table customization tools
|
||||
* Table customisation tools
|
||||
* Sticky footer
|
||||
* Multi columns tiddler
|
||||
* Multi column story river
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user