mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2026-01-25 04:14:40 +00:00
Compare commits
63 Commits
v5.0.1-alp
...
v5.0.2-bet
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b8c9422161 | ||
|
|
d7ebd461f2 | ||
|
|
57adbe5bf7 | ||
|
|
34e6d79ef6 | ||
|
|
713d6945c6 | ||
|
|
ef9175e7bc | ||
|
|
6a8feb216a | ||
|
|
b1e7ba29f1 | ||
|
|
79c8935aef | ||
|
|
8496337d30 | ||
|
|
2126ce1d17 | ||
|
|
3f06384516 | ||
|
|
053e09af6e | ||
|
|
c190b0f1ea | ||
|
|
819843e4b0 | ||
|
|
6386e60896 | ||
|
|
7c9b920e26 | ||
|
|
ae4a2b58ed | ||
|
|
c73a7af95b | ||
|
|
1420aa2f58 | ||
|
|
0814f3623d | ||
|
|
382d7e4449 | ||
|
|
e2cd611e45 | ||
|
|
bb03bb942f | ||
|
|
fd996bad20 | ||
|
|
3f3cac12ba | ||
|
|
761b66028d | ||
|
|
7e151a98da | ||
|
|
e537457d4b | ||
|
|
e686d62400 | ||
|
|
ae6d1b1685 | ||
|
|
49b3165fbd | ||
|
|
6a21965cee | ||
|
|
b9faadbbc9 | ||
|
|
c610161455 | ||
|
|
6dbd178378 | ||
|
|
77bca22d42 | ||
|
|
9f058925f7 | ||
|
|
1b75242345 | ||
|
|
6298c7aa43 | ||
|
|
853cca906c | ||
|
|
cffe9375b2 | ||
|
|
b8897f86fb | ||
|
|
409311b61e | ||
|
|
d11cda4854 | ||
|
|
6a71b399b0 | ||
|
|
2e188a48f4 | ||
|
|
b4733414e5 | ||
|
|
67072371a0 | ||
|
|
a9c209c62e | ||
|
|
bc84df1707 | ||
|
|
062822d45c | ||
|
|
2e0e8a879f | ||
|
|
2ffcbb76eb | ||
|
|
50e1727ef7 | ||
|
|
7a99fb1250 | ||
|
|
e6e47ca83d | ||
|
|
489b40314b | ||
|
|
14cf9ad24a | ||
|
|
428e27d4bf | ||
|
|
0edf46dee1 | ||
|
|
c38cd500f6 | ||
|
|
d739b6939a |
1
bld.cmd
1
bld.cmd
@@ -38,6 +38,7 @@ node .\tiddlywiki.js ^
|
||||
--rendertiddler ReadMe .\readme.md text/html ^
|
||||
--rendertiddler ContributingTemplate .\contributing.md text/html ^
|
||||
--rendertiddler $:/editions/tw5.com/download-empty %TW5_BUILD_OUTPUT%\empty.html text/plain ^
|
||||
--rendertiddler $:/editions/tw5.com/download-empty %TW5_BUILD_OUTPUT%\empty.hta text/plain ^
|
||||
--rendertiddler $:/core/templates/static.template.html %TW5_BUILD_OUTPUT%\static.html text/plain ^
|
||||
--rendertiddler $:/core/templates/static.template.css %TW5_BUILD_OUTPUT%\static\static.css text/plain ^
|
||||
--rendertiddlers [!is[system]] $:/core/templates/static.tiddler.html %TW5_BUILD_OUTPUT%\static text/plain ^
|
||||
|
||||
1
bld.sh
1
bld.sh
@@ -39,6 +39,7 @@ node ./tiddlywiki.js \
|
||||
--rendertiddler ReadMe ./readme.md text/html \
|
||||
--rendertiddler ContributingTemplate ./contributing.md text/html \
|
||||
--rendertiddler $:/editions/tw5.com/download-empty $TW5_BUILD_OUTPUT/empty.html text/plain \
|
||||
--rendertiddler $:/editions/tw5.com/download-empty $TW5_BUILD_OUTPUT/empty.hta text/plain \
|
||||
--rendertiddler $:/core/templates/static.template.html $TW5_BUILD_OUTPUT/static.html text/plain \
|
||||
--rendertiddler $:/core/templates/static.template.css $TW5_BUILD_OUTPUT/static/static.css text/plain \
|
||||
--rendertiddlers [!is[system]] $:/core/templates/static.tiddler.html $TW5_BUILD_OUTPUT/static text/plain \
|
||||
|
||||
@@ -1232,13 +1232,14 @@ $tw.loadPluginFolder = function(filepath,excludeRegExp) {
|
||||
var fields = {
|
||||
title: pluginInfo.title,
|
||||
type: "application/json",
|
||||
text: JSON.stringify(pluginInfo,null,4),
|
||||
text: JSON.stringify({tiddlers: pluginInfo.tiddlers},null,4),
|
||||
"plugin-priority": pluginInfo["plugin-priority"],
|
||||
"name": pluginInfo["name"],
|
||||
"version": pluginInfo["version"],
|
||||
"thumbnail": pluginInfo["thumbnail"],
|
||||
"description": pluginInfo["description"],
|
||||
"plugin-type": pluginInfo["plugin-type"] || "plugin"
|
||||
"plugin-type": pluginInfo["plugin-type"] || "plugin",
|
||||
"dependents": $tw.utils.stringifyList(pluginInfo["dependents"] || [])
|
||||
}
|
||||
return fields;
|
||||
} else {
|
||||
|
||||
@@ -203,7 +203,7 @@ var Command = function(params,commander,callback) {
|
||||
handler: function(request,response,state) {
|
||||
response.writeHead(200, {"Content-Type": "application/json"});
|
||||
var tiddlers = [];
|
||||
state.wiki.forEachTiddler("title",function(title,tiddler) {
|
||||
state.wiki.forEachTiddler({sortField: "title"},function(title,tiddler) {
|
||||
var tiddlerFields = {};
|
||||
$tw.utils.each(tiddler.fields,function(field,name) {
|
||||
if(name !== "text") {
|
||||
@@ -255,7 +255,7 @@ Command.prototype.execute = function() {
|
||||
rootTiddler = this.params[1] || "$:/core/save/all",
|
||||
renderType = this.params[2] || "text/plain",
|
||||
serveType = this.params[3] || "text/html",
|
||||
username = this.params[4] || "ANONYMOUS",
|
||||
username = this.params[4],
|
||||
password = this.params[5];
|
||||
this.server.set({
|
||||
rootTiddler: rootTiddler,
|
||||
|
||||
58
core/modules/parsers/wikiparser/rules/hardlinebreaks.js
Normal file
58
core/modules/parsers/wikiparser/rules/hardlinebreaks.js
Normal file
@@ -0,0 +1,58 @@
|
||||
/*\
|
||||
title: $:/core/modules/parsers/wikiparser/rules/hardlinebreaks.js
|
||||
type: application/javascript
|
||||
module-type: wikirule
|
||||
|
||||
Wiki text inline rule for marking areas with hard line breaks. For example:
|
||||
|
||||
```
|
||||
"""
|
||||
This is some text
|
||||
That is set like
|
||||
It is a Poem
|
||||
When it is
|
||||
Clearly
|
||||
Not
|
||||
"""
|
||||
```
|
||||
|
||||
\*/
|
||||
(function(){
|
||||
|
||||
/*jslint node: true, browser: true */
|
||||
/*global $tw: false */
|
||||
"use strict";
|
||||
|
||||
exports.name = "hardlinebreaks";
|
||||
exports.types = {inline: true};
|
||||
|
||||
exports.init = function(parser) {
|
||||
this.parser = parser;
|
||||
// Regexp to match
|
||||
this.matchRegExp = /"""(?:\r?\n)?/mg;
|
||||
};
|
||||
|
||||
exports.parse = function() {
|
||||
var reEnd = /(""")|(\r?\n)/mg,
|
||||
tree = [];
|
||||
// Move past the match
|
||||
this.parser.pos = this.matchRegExp.lastIndex;
|
||||
do {
|
||||
// Parse the run up to the terminator
|
||||
tree.push.apply(tree,this.parser.parseInlineRun(reEnd,{eatTerminator: false}));
|
||||
// Redo the terminator match
|
||||
reEnd.lastIndex = this.parser.pos;
|
||||
var match = reEnd.exec(this.parser.source);
|
||||
if(match) {
|
||||
this.parser.pos = reEnd.lastIndex;
|
||||
// Add a line break if the terminator was a line break
|
||||
if(match[2]) {
|
||||
tree.push({type: "element", tag: "br"});
|
||||
}
|
||||
}
|
||||
} while(match && !match[1]);
|
||||
// Return the nodes
|
||||
return tree;
|
||||
};
|
||||
|
||||
})();
|
||||
75
core/modules/savers/fsosaver.js
Normal file
75
core/modules/savers/fsosaver.js
Normal file
@@ -0,0 +1,75 @@
|
||||
/*\
|
||||
title: $:/core/modules/savers/fsosaver.js
|
||||
type: application/javascript
|
||||
module-type: saver
|
||||
|
||||
Handles saving changes via MS FileSystemObject ActiveXObject
|
||||
|
||||
Note: Since TiddlyWiki's markup contains the MOTW, the FileSystemObject normally won't be available.
|
||||
However, if the wiki is loaded as an .HTA file (Windows HTML Applications) then the FSO can be used.
|
||||
|
||||
\*/
|
||||
(function(){
|
||||
|
||||
/*jslint node: true, browser: true */
|
||||
/*global $tw: false */
|
||||
"use strict";
|
||||
|
||||
/*
|
||||
Select the appropriate saver module and set it up
|
||||
*/
|
||||
var FSOSaver = function(wiki) {
|
||||
};
|
||||
|
||||
FSOSaver.prototype.save = function(text,method,callback) {
|
||||
// Bail out unless this is a save (rather than a download)
|
||||
if(method !== "save") {
|
||||
return false;
|
||||
}
|
||||
// Get the pathname of this document
|
||||
var pathname = unescape(document.location.pathname);
|
||||
// Test for a Windows path of the form /x:\blah...
|
||||
if(/^\/[A-Z]\:\\[^\\]+/i.test(pathname)) { // ie: ^/[a-z]:/[^/]+
|
||||
// Remove the leading slash
|
||||
pathname = pathname.substr(1);
|
||||
} else if (document.location.hostname !== "" && /^\/\\[^\\]+\\[^\\]+/i.test(pathname)) { // test for \\server\share\blah... - ^/[^/]+/[^/]+
|
||||
// Remove the leading slash
|
||||
pathname = pathname.substr(1);
|
||||
// reconstruct UNC path
|
||||
pathname = "\\\\" + document.location.hostname + pathname;
|
||||
} else return false;
|
||||
|
||||
// Save the file (as UTF-16)
|
||||
var fso = new ActiveXObject("Scripting.FileSystemObject");
|
||||
var file = fso.OpenTextFile(pathname,2,-1,-1);
|
||||
|
||||
file.Write(text);
|
||||
file.Close();
|
||||
return true;
|
||||
};
|
||||
|
||||
/*
|
||||
Information about this saver
|
||||
*/
|
||||
FSOSaver.prototype.info = {
|
||||
name: "FSOSaver",
|
||||
priority: 120
|
||||
};
|
||||
|
||||
/*
|
||||
Static method that returns true if this saver is capable of working
|
||||
*/
|
||||
exports.canSave = function(wiki) {
|
||||
try {
|
||||
return (window.location.protocol === "file:") && !!(new ActiveXObject("Scripting.FileSystemObject"));
|
||||
} catch(e) { return false; }
|
||||
};
|
||||
|
||||
/*
|
||||
Create an instance of this saver
|
||||
*/
|
||||
exports.create = function(wiki) {
|
||||
return new FSOSaver(wiki);
|
||||
};
|
||||
|
||||
})();
|
||||
73
core/modules/savers/tiddlyie.js
Normal file
73
core/modules/savers/tiddlyie.js
Normal file
@@ -0,0 +1,73 @@
|
||||
/*\
|
||||
title: $:/core/modules/savers/tiddlyie.js
|
||||
type: application/javascript
|
||||
module-type: saver
|
||||
|
||||
Handles saving changes via Internet Explorer BHO extenion (TiddlyIE)
|
||||
|
||||
\*/
|
||||
(function(){
|
||||
|
||||
/*jslint node: true, browser: true */
|
||||
/*global $tw: false */
|
||||
"use strict";
|
||||
|
||||
/*
|
||||
Select the appropriate saver module and set it up
|
||||
*/
|
||||
var TiddlyIESaver = function(wiki) {
|
||||
};
|
||||
|
||||
TiddlyIESaver.prototype.save = function(text,method,callback) {
|
||||
// Bail out unless this is a save (rather than a download)
|
||||
if(method !== "save") {
|
||||
return false;
|
||||
}
|
||||
// check existence of TiddlyIE BHO extension (note: only works after document is complete)
|
||||
if(typeof(window.TiddlyIE) != "undefined") {
|
||||
// Get the pathname of this document
|
||||
var pathname = unescape(document.location.pathname);
|
||||
// Test for a Windows path of the form /x:/blah...
|
||||
if(/^\/[A-Z]\:\/[^\/]+/i.test(pathname)) { // ie: ^/[a-z]:/[^/]+ (is this better?: ^/[a-z]:/[^/]+(/[^/]+)*\.[^/]+ )
|
||||
// Remove the leading slash
|
||||
pathname = pathname.substr(1);
|
||||
// Convert slashes to backslashes
|
||||
pathname = pathname.replace(/\//g,"\\");
|
||||
} else if(document.hostname !== "" && /^\/[^\/]+\/[^\/]+/i.test(pathname)) { // test for \\server\share\blah... - ^/[^/]+/[^/]+
|
||||
// Convert slashes to backslashes
|
||||
pathname = pathname.replace(/\//g,"\\");
|
||||
// reconstruct UNC path
|
||||
pathname = "\\\\" + document.location.hostname + pathname;
|
||||
} else return false;
|
||||
|
||||
// Prompt the user to save the file
|
||||
window.TiddlyIE.save(pathname, text);
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
};
|
||||
|
||||
/*
|
||||
Information about this saver
|
||||
*/
|
||||
TiddlyIESaver.prototype.info = {
|
||||
name: "tiddlyiesaver",
|
||||
priority: 1500
|
||||
};
|
||||
|
||||
/*
|
||||
Static method that returns true if this saver is capable of working
|
||||
*/
|
||||
exports.canSave = function(wiki) {
|
||||
return (window.location.protocol === "file:");
|
||||
};
|
||||
|
||||
/*
|
||||
Create an instance of this saver
|
||||
*/
|
||||
exports.create = function(wiki) {
|
||||
return new TiddlyIESaver(wiki);
|
||||
};
|
||||
|
||||
})();
|
||||
@@ -68,13 +68,11 @@ Syncer.prototype.init = function() {
|
||||
// Hashmap by title of {revision:,changeCount:,adaptorInfo:}
|
||||
this.tiddlerInfo = {};
|
||||
// Record information for known tiddlers
|
||||
this.wiki.forEachTiddler(function(title,tiddler) {
|
||||
if(tiddler.fields["revision"]) {
|
||||
self.tiddlerInfo[title] = {
|
||||
revision: tiddler.fields["revision"],
|
||||
adaptorInfo: self.syncadaptor.getTiddlerInfo(tiddler),
|
||||
changeCount: self.wiki.getChangeCount(title)
|
||||
}
|
||||
this.wiki.forEachTiddler({includeSystem: true},function(title,tiddler) {
|
||||
self.tiddlerInfo[title] = {
|
||||
revision: tiddler.fields["revision"],
|
||||
adaptorInfo: self.syncadaptor.getTiddlerInfo(tiddler),
|
||||
changeCount: self.wiki.getChangeCount(title)
|
||||
}
|
||||
});
|
||||
// Tasks are {type: "load"/"save"/"delete", title:, queueTime:, lastModificationTime:}
|
||||
@@ -439,19 +437,21 @@ Syncer.prototype.dispatchTask = function(task,callback) {
|
||||
var changeCount = this.wiki.getChangeCount(task.title),
|
||||
tiddler = this.wiki.getTiddler(task.title);
|
||||
this.log("Dispatching 'save' task:",task.title);
|
||||
this.syncadaptor.saveTiddler(tiddler,function(err,adaptorInfo,revision) {
|
||||
if(err) {
|
||||
return callback(err);
|
||||
}
|
||||
// Adjust the info stored about this tiddler
|
||||
self.tiddlerInfo[task.title] = {
|
||||
changeCount: changeCount,
|
||||
adaptorInfo: adaptorInfo,
|
||||
revision: revision
|
||||
};
|
||||
// Invoke the callback
|
||||
callback(null);
|
||||
});
|
||||
if(tiddler) {
|
||||
this.syncadaptor.saveTiddler(tiddler,function(err,adaptorInfo,revision) {
|
||||
if(err) {
|
||||
return callback(err);
|
||||
}
|
||||
// Adjust the info stored about this tiddler
|
||||
self.tiddlerInfo[task.title] = {
|
||||
changeCount: changeCount,
|
||||
adaptorInfo: adaptorInfo,
|
||||
revision: revision
|
||||
};
|
||||
// Invoke the callback
|
||||
callback(null);
|
||||
});
|
||||
}
|
||||
} else if(task.type === "load") {
|
||||
// Load the tiddler
|
||||
this.log("Dispatching 'load' task:",task.title);
|
||||
@@ -460,7 +460,9 @@ Syncer.prototype.dispatchTask = function(task,callback) {
|
||||
return callback(err);
|
||||
}
|
||||
// Store the tiddler
|
||||
self.storeTiddler(tiddlerFields);
|
||||
if(tiddlerFields) {
|
||||
self.storeTiddler(tiddlerFields);
|
||||
}
|
||||
// Invoke the callback
|
||||
callback(null);
|
||||
});
|
||||
|
||||
@@ -48,8 +48,9 @@ ThemeManager.prototype.switchTheme = function() {
|
||||
var tiddler = self.wiki.getTiddler(title);
|
||||
if(tiddler && tiddler.isPlugin() && themePlugins.indexOf(title) === -1) {
|
||||
themePlugins.push(title);
|
||||
var pluginInfo = JSON.parse(self.wiki.getTiddlerText(title));
|
||||
$tw.utils.each(pluginInfo.dependents,function(title) {
|
||||
var pluginInfo = JSON.parse(self.wiki.getTiddlerText(title)),
|
||||
dependents = $tw.utils.parseStringArray(tiddler.fields.dependents || "");
|
||||
$tw.utils.each(dependents,function(title) {
|
||||
accumulatePlugin(title);
|
||||
});
|
||||
}
|
||||
|
||||
@@ -45,7 +45,9 @@ EditTextWidget.prototype.render = function(parent,nextSibling) {
|
||||
domNode.setAttribute("placeholder",this.editPlaceholder);
|
||||
}
|
||||
// Assign classes
|
||||
domNode.className = this.editClass;
|
||||
if(this.editClass) {
|
||||
domNode.className = this.editClass;
|
||||
}
|
||||
// Set the text
|
||||
var editInfo = this.getEditInfo();
|
||||
if(this.editTag === "textarea") {
|
||||
|
||||
@@ -70,100 +70,123 @@ NavigatorWidget.prototype.refresh = function(changedTiddlers) {
|
||||
};
|
||||
|
||||
NavigatorWidget.prototype.getStoryList = function() {
|
||||
this.storyList = this.wiki.getTiddlerList(this.storyTitle);
|
||||
return this.storyTitle ? this.wiki.getTiddlerList(this.storyTitle) : null;
|
||||
};
|
||||
|
||||
NavigatorWidget.prototype.saveStoryList = function() {
|
||||
NavigatorWidget.prototype.saveStoryList = function(storyList) {
|
||||
var storyTiddler = this.wiki.getTiddler(this.storyTitle);
|
||||
this.wiki.addTiddler(new $tw.Tiddler({
|
||||
title: this.storyTitle
|
||||
},storyTiddler,{list: this.storyList}));
|
||||
this.wiki.addTiddler(new $tw.Tiddler(
|
||||
{title: this.storyTitle},
|
||||
storyTiddler,
|
||||
{list: storyList}
|
||||
));
|
||||
};
|
||||
|
||||
NavigatorWidget.prototype.findTitleInStory = function(title,defaultIndex) {
|
||||
for(var t=0; t<this.storyList.length; t++) {
|
||||
if(this.storyList[t] === title) {
|
||||
return t;
|
||||
NavigatorWidget.prototype.findTitleInStory = function(storyList,title,defaultIndex) {
|
||||
var p = storyList.indexOf(title);
|
||||
return p === -1 ? defaultIndex : p;
|
||||
};
|
||||
|
||||
NavigatorWidget.prototype.removeTitleFromStory = function(storyList,title) {
|
||||
var p = storyList.indexOf(title);
|
||||
while(p !== -1) {
|
||||
storyList.splice(p,1);
|
||||
p = storyList.indexOf(title);
|
||||
}
|
||||
};
|
||||
|
||||
NavigatorWidget.prototype.replaceFirstTitleInStory = function(storyList,oldTitle,newTitle) {
|
||||
var pos = storyList.indexOf(oldTitle);
|
||||
if(pos !== -1) {
|
||||
storyList[pos] = newTitle;
|
||||
do {
|
||||
pos = storyList.indexOf(oldTitle,pos + 1);
|
||||
if(pos !== -1) {
|
||||
storyList.splice(pos,1);
|
||||
}
|
||||
} while(pos !== -1);
|
||||
} else {
|
||||
storyList.splice(0,0,newTitle);
|
||||
}
|
||||
};
|
||||
|
||||
NavigatorWidget.prototype.addToStory = function(title,fromTitle) {
|
||||
var storyList = this.getStoryList();
|
||||
if(storyList) {
|
||||
// See if the tiddler is already there
|
||||
var slot = this.findTitleInStory(storyList,title,-1);
|
||||
// If not we need to add it
|
||||
if(slot === -1) {
|
||||
// First we try to find the position of the story element we navigated from
|
||||
slot = this.findTitleInStory(storyList,fromTitle,-1) + 1;
|
||||
// Add the tiddler
|
||||
storyList.splice(slot,0,title);
|
||||
// Save the story
|
||||
this.saveStoryList(storyList);
|
||||
}
|
||||
}
|
||||
return defaultIndex;
|
||||
}
|
||||
};
|
||||
|
||||
/*
|
||||
Add a new record to the top of the history stack
|
||||
title: a title string or an array of title strings
|
||||
fromPageRect: page coordinates of the origin of the navigation
|
||||
*/
|
||||
NavigatorWidget.prototype.addToHistory = function(title,fromPageRect) {
|
||||
var titles = $tw.utils.isArray(title) ? title : [title];
|
||||
// Add a new record to the top of the history stack
|
||||
if(this.historyTitle) {
|
||||
var historyList = this.wiki.getTiddlerData(this.historyTitle,[]);
|
||||
$tw.utils.each(titles,function(title) {
|
||||
historyList.push({title: title, fromPageRect: fromPageRect});
|
||||
});
|
||||
this.wiki.setTiddlerData(this.historyTitle,historyList);
|
||||
}
|
||||
};
|
||||
|
||||
/*
|
||||
Handle a tw-navigate event
|
||||
*/
|
||||
NavigatorWidget.prototype.handleNavigateEvent = function(event) {
|
||||
if(this.storyTitle) {
|
||||
// Update the story tiddler if specified
|
||||
this.getStoryList();
|
||||
// See if the tiddler is already there
|
||||
var slot = this.findTitleInStory(event.navigateTo,-1);
|
||||
// If not we need to add it
|
||||
if(slot === -1) {
|
||||
// First we try to find the position of the story element we navigated from
|
||||
slot = this.findTitleInStory(event.navigateFromTitle,-1) + 1;
|
||||
// Add the tiddler
|
||||
this.storyList.splice(slot,0,event.navigateTo);
|
||||
// Save the story
|
||||
this.saveStoryList();
|
||||
}
|
||||
}
|
||||
// Add a new record to the top of the history stack
|
||||
if(this.historyTitle) {
|
||||
var historyList = this.wiki.getTiddlerData(this.historyTitle,[]);
|
||||
historyList.push({title: event.navigateTo, fromPageRect: event.navigateFromClientRect});
|
||||
this.wiki.setTiddlerData(this.historyTitle,historyList);
|
||||
}
|
||||
this.addToStory(event.navigateTo,event.navigateFromTitle);
|
||||
this.addToHistory(event.navigateTo,event.navigateFromClientRect);
|
||||
return false;
|
||||
};
|
||||
|
||||
// Close a specified tiddler
|
||||
NavigatorWidget.prototype.handleCloseTiddlerEvent = function(event) {
|
||||
this.getStoryList();
|
||||
var title = event.param || event.tiddlerTitle,
|
||||
storyList = this.getStoryList();
|
||||
// Look for tiddlers with this title to close
|
||||
var slot = this.findTitleInStory(event.tiddlerTitle,-1);
|
||||
if(slot !== -1) {
|
||||
this.storyList.splice(slot,1);
|
||||
this.saveStoryList();
|
||||
}
|
||||
this.removeTitleFromStory(storyList,title);
|
||||
this.saveStoryList(storyList);
|
||||
return false;
|
||||
};
|
||||
|
||||
// Close all tiddlers
|
||||
NavigatorWidget.prototype.handleCloseAllTiddlersEvent = function(event) {
|
||||
this.storyList = [];
|
||||
this.saveStoryList();
|
||||
this.saveStoryList([]);
|
||||
return false;
|
||||
};
|
||||
|
||||
// Close other tiddlers
|
||||
NavigatorWidget.prototype.handleCloseOtherTiddlersEvent = function(event) {
|
||||
this.storyList = [event.tiddlerTitle];
|
||||
this.saveStoryList();
|
||||
var title = event.param || event.tiddlerTitle;
|
||||
this.saveStoryList([title]);
|
||||
return false;
|
||||
};
|
||||
|
||||
// Place a tiddler in edit mode
|
||||
NavigatorWidget.prototype.handleEditTiddlerEvent = function(event) {
|
||||
this.getStoryList();
|
||||
// Replace the specified tiddler with a draft in edit mode
|
||||
var title = event.param || event.tiddlerTitle,
|
||||
draftTiddler = this.getDraftTiddler(title),
|
||||
gotOne = false;
|
||||
for(var t=this.storyList.length-1; t>=0; t--) {
|
||||
// Replace the first story instance of the original tiddler name with the draft title
|
||||
if(this.storyList[t] === title) {
|
||||
if(!gotOne) {
|
||||
this.storyList[t] = draftTiddler.fields.title;
|
||||
gotOne = true;
|
||||
} else {
|
||||
this.storyList.splice(t,1);
|
||||
}
|
||||
} else if(this.storyList[t] === draftTiddler.fields.title) {
|
||||
// Remove any existing references to the draft
|
||||
this.storyList.splice(t,1);
|
||||
}
|
||||
}
|
||||
this.saveStoryList();
|
||||
draftTiddler = this.makeDraftTiddler(title),
|
||||
draftTitle = draftTiddler.fields.title,
|
||||
storyList = this.getStoryList();
|
||||
this.removeTitleFromStory(storyList,draftTitle);
|
||||
this.replaceFirstTitleInStory(storyList,title,draftTitle);
|
||||
this.addToHistory(draftTitle,event.navigateFromClientRect);
|
||||
this.saveStoryList(storyList);
|
||||
return false;
|
||||
};
|
||||
|
||||
@@ -171,32 +194,30 @@ NavigatorWidget.prototype.handleEditTiddlerEvent = function(event) {
|
||||
NavigatorWidget.prototype.handleDeleteTiddlerEvent = function(event) {
|
||||
// Get the tiddler we're deleting
|
||||
var title = event.param || event.tiddlerTitle,
|
||||
tiddler = this.wiki.getTiddler(title);
|
||||
tiddler = this.wiki.getTiddler(title),
|
||||
storyList = this.getStoryList();
|
||||
// Check if the tiddler we're deleting is in draft mode
|
||||
if(tiddler.hasField("draft.title")) {
|
||||
// Delete the original tiddler
|
||||
this.wiki.deleteTiddler(tiddler.fields["draft.of"]);
|
||||
var originalTitle = tiddler.fields["draft.of"];
|
||||
this.wiki.deleteTiddler(originalTitle);
|
||||
this.removeTitleFromStory(storyList,originalTitle);
|
||||
}
|
||||
// Delete this tiddler
|
||||
this.wiki.deleteTiddler(title);
|
||||
// Remove the closed tiddler from the story
|
||||
this.getStoryList();
|
||||
// Look for tiddler with this title to close
|
||||
var slot = this.findTitleInStory(title,-1);
|
||||
if(slot !== -1) {
|
||||
this.storyList.splice(slot,1);
|
||||
this.saveStoryList();
|
||||
}
|
||||
this.removeTitleFromStory(storyList,title);
|
||||
this.saveStoryList(storyList);
|
||||
return false;
|
||||
};
|
||||
|
||||
/*
|
||||
Create/reuse the draft tiddler for a given title
|
||||
*/
|
||||
NavigatorWidget.prototype.getDraftTiddler = function(targetTitle) {
|
||||
NavigatorWidget.prototype.makeDraftTiddler = function(targetTitle) {
|
||||
// See if there is already a draft tiddler for this tiddler
|
||||
var drafts = [];
|
||||
this.wiki.forEachTiddler(function(title,tiddler) {
|
||||
this.wiki.forEachTiddler({includeSystem: true},function(title,tiddler) {
|
||||
if(tiddler.fields["draft.title"] && tiddler.fields["draft.of"] === targetTitle) {
|
||||
drafts.push(tiddler);
|
||||
}
|
||||
@@ -236,73 +257,58 @@ NavigatorWidget.prototype.generateDraftTitle = function(title) {
|
||||
|
||||
// Take a tiddler out of edit mode, saving the changes
|
||||
NavigatorWidget.prototype.handleSaveTiddlerEvent = function(event) {
|
||||
this.getStoryList();
|
||||
var title = event.param || event.tiddlerTitle,
|
||||
tiddler = this.wiki.getTiddler(title),
|
||||
storyList = this.getStoryList(),
|
||||
storyTiddlerModified = false; // We have to special case saving the story tiddler itself
|
||||
for(var t=0; t<this.storyList.length; t++) {
|
||||
if(this.storyList[t] === title) {
|
||||
var tiddler = this.wiki.getTiddler(title);
|
||||
if(tiddler) {
|
||||
var draftTitle = (tiddler.fields["draft.title"] || "").trim(),
|
||||
draftOf = (tiddler.fields["draft.of"] || "").trim();
|
||||
if(draftTitle) {
|
||||
var isRename = draftOf !== draftTitle,
|
||||
isConfirmed = true;
|
||||
if(isRename && this.wiki.tiddlerExists(draftTitle)) {
|
||||
isConfirmed = confirm("Do you wish to overwrite the tiddler '" + draftTitle + "'?");
|
||||
}
|
||||
if(isConfirmed) {
|
||||
// Save the draft tiddler as the real tiddler
|
||||
this.wiki.addTiddler(new $tw.Tiddler(this.wiki.getCreationFields(),tiddler,{
|
||||
title: draftTitle,
|
||||
"draft.title": undefined,
|
||||
"draft.of": undefined
|
||||
},this.wiki.getModificationFields()));
|
||||
// Remove the draft tiddler
|
||||
this.wiki.deleteTiddler(title);
|
||||
// Remove the original tiddler if we're renaming it
|
||||
if(isRename) {
|
||||
this.wiki.deleteTiddler(draftOf);
|
||||
}
|
||||
// Make the story record point to the newly saved tiddler
|
||||
this.storyList[t] = draftTitle;
|
||||
// Check if we're modifying the story tiddler itself
|
||||
if(draftTitle === this.storyTitle) {
|
||||
storyTiddlerModified = true;
|
||||
}
|
||||
}
|
||||
// Replace the original tiddler with the draft
|
||||
if(tiddler) {
|
||||
var draftTitle = (tiddler.fields["draft.title"] || "").trim(),
|
||||
draftOf = (tiddler.fields["draft.of"] || "").trim();
|
||||
if(draftTitle) {
|
||||
var isRename = draftOf !== draftTitle,
|
||||
isConfirmed = true;
|
||||
if(isRename && this.wiki.tiddlerExists(draftTitle)) {
|
||||
isConfirmed = confirm("Do you wish to overwrite the tiddler '" + draftTitle + "'?");
|
||||
}
|
||||
if(isConfirmed) {
|
||||
// Save the draft tiddler as the real tiddler
|
||||
this.wiki.addTiddler(new $tw.Tiddler(this.wiki.getCreationFields(),tiddler,{
|
||||
title: draftTitle,
|
||||
"draft.title": undefined,
|
||||
"draft.of": undefined
|
||||
},this.wiki.getModificationFields()));
|
||||
// Remove the draft tiddler
|
||||
this.wiki.deleteTiddler(title);
|
||||
// Remove the original tiddler if we're renaming it
|
||||
if(isRename) {
|
||||
this.wiki.deleteTiddler(draftOf);
|
||||
}
|
||||
// Replace the draft in the story with the original
|
||||
this.replaceFirstTitleInStory(storyList,title,draftTitle);
|
||||
this.addToHistory(draftTitle,event.navigateFromClientRect);
|
||||
if(draftTitle !== this.storyTitle) {
|
||||
this.saveStoryList(storyList);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if(!storyTiddlerModified) {
|
||||
this.saveStoryList();
|
||||
}
|
||||
return false;
|
||||
};
|
||||
|
||||
// Take a tiddler out of edit mode without saving the changes
|
||||
NavigatorWidget.prototype.handleCancelTiddlerEvent = function(event) {
|
||||
this.getStoryList();
|
||||
var storyTiddlerModified = false;
|
||||
// Flip the specified tiddler from draft back to the original
|
||||
var draftTitle = event.param || event.tiddlerTitle,
|
||||
draftTiddler = this.wiki.getTiddler(draftTitle);
|
||||
if(draftTiddler && draftTiddler.hasField("draft.of")) {
|
||||
var originalTitle = draftTiddler.fields["draft.of"];
|
||||
draftTiddler = this.wiki.getTiddler(draftTitle),
|
||||
originalTitle = draftTiddler.fields["draft.of"],
|
||||
storyList = this.getStoryList();
|
||||
if(draftTiddler && originalTitle) {
|
||||
// Remove the draft tiddler
|
||||
this.wiki.deleteTiddler(draftTitle);
|
||||
// Swap the draft for the original in the story
|
||||
for(var t=0; t<this.storyList.length; t++) {
|
||||
if(this.storyList[t] === draftTitle) {
|
||||
// Make the story record point to the original tiddler
|
||||
this.storyList[t] = originalTitle;
|
||||
storyTiddlerModified = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
if(storyTiddlerModified) {
|
||||
this.saveStoryList();
|
||||
this.replaceFirstTitleInStory(storyList,draftTitle,originalTitle);
|
||||
this.addToHistory(originalTitle,event.navigateFromClientRect);
|
||||
this.saveStoryList(storyList);
|
||||
}
|
||||
return false;
|
||||
};
|
||||
@@ -310,14 +316,14 @@ NavigatorWidget.prototype.handleCancelTiddlerEvent = function(event) {
|
||||
// Create a new draft tiddler
|
||||
NavigatorWidget.prototype.handleNewTiddlerEvent = function(event) {
|
||||
// Get the story details
|
||||
this.getStoryList();
|
||||
var storyList = this.getStoryList();
|
||||
// Get the template tiddler if there is one
|
||||
var templateTiddler = this.wiki.getTiddler(event.param);
|
||||
// Create the new tiddler
|
||||
var baseTitle = (templateTiddler && templateTiddler.fields.title) || "New Tiddler",
|
||||
title;
|
||||
for(var t=0; true; t++) {
|
||||
title = baseTitle + (t ? " " + t : "");
|
||||
title = baseTitle + (t ? " " + t : "");
|
||||
if(!this.wiki.tiddlerExists(title)) {
|
||||
break;
|
||||
}
|
||||
@@ -338,14 +344,12 @@ NavigatorWidget.prototype.handleNewTiddlerEvent = function(event) {
|
||||
},this.wiki.getModificationFields());
|
||||
this.wiki.addTiddler(draftTiddler);
|
||||
// Update the story to insert the new draft at the top
|
||||
var slot = this.findTitleInStory(event.navigateFromTitle,-1) + 1;
|
||||
this.storyList.splice(slot,0,draftTitle);
|
||||
var slot = storyList.indexOf(event.navigateFromTitle);
|
||||
storyList.splice(slot + 1,0,draftTitle);
|
||||
// Save the updated story
|
||||
this.saveStoryList();
|
||||
this.saveStoryList(storyList);
|
||||
// Add a new record to the top of the history stack
|
||||
var history = this.wiki.getTiddlerData(this.historyTitle,[]);
|
||||
history.push({title: draftTitle});
|
||||
this.wiki.setTiddlerData(this.historyTitle,history);
|
||||
this.addToHistory(draftTitle);
|
||||
return false;
|
||||
};
|
||||
|
||||
@@ -353,8 +357,8 @@ NavigatorWidget.prototype.handleNewTiddlerEvent = function(event) {
|
||||
NavigatorWidget.prototype.handleImportTiddlersEvent = function(event) {
|
||||
var self = this;
|
||||
// Get the story and history details
|
||||
this.getStoryList();
|
||||
var history = this.wiki.getTiddlerData(this.historyTitle,[]);
|
||||
var storyList = this.getStoryList();
|
||||
var history = [];
|
||||
// Get the tiddlers
|
||||
var tiddlers = [];
|
||||
try {
|
||||
@@ -372,16 +376,16 @@ NavigatorWidget.prototype.handleImportTiddlersEvent = function(event) {
|
||||
));
|
||||
if(imported) {
|
||||
// Add it to the story
|
||||
if(self.storyList.indexOf(title) === -1) {
|
||||
self.storyList.unshift(title);
|
||||
if(storyList.indexOf(title) === -1) {
|
||||
storyList.unshift(title);
|
||||
}
|
||||
// And to history
|
||||
history.push({title: title});
|
||||
history.push(title);
|
||||
}
|
||||
});
|
||||
// Save the updated story and history
|
||||
this.saveStoryList();
|
||||
this.wiki.setTiddlerData(this.historyTitle,history);
|
||||
this.saveStoryList(storyList);
|
||||
this.addToHistory(history);
|
||||
return false;
|
||||
};
|
||||
|
||||
|
||||
129
core/modules/widgets/radio.js
Normal file
129
core/modules/widgets/radio.js
Normal file
@@ -0,0 +1,129 @@
|
||||
/*\
|
||||
title: $:/core/modules/widgets/radio.js
|
||||
type: application/javascript
|
||||
module-type: widget
|
||||
|
||||
Radio widget
|
||||
|
||||
Will set a field to the selected value:
|
||||
|
||||
```
|
||||
<$radio field="myfield" value="check 1">one</$radio>
|
||||
<$radio field="myfield" value="check 2">two</$radio>
|
||||
<$radio field="myfield" value="check 3">three</$radio>
|
||||
```
|
||||
|
||||
|Parameter |Description |h
|
||||
|tiddler |Name of the tiddler in which the field should be set. Defaults to current tiddler |
|
||||
|field |The name of the field to be set |
|
||||
|value |The value to set |
|
||||
|class |Optional class name(s) |
|
||||
|
||||
|
||||
\*/
|
||||
(function(){
|
||||
|
||||
/*jslint node: true, browser: true */
|
||||
/*global $tw: false */
|
||||
"use strict";
|
||||
|
||||
var Widget = require("$:/core/modules/widgets/widget.js").widget;
|
||||
|
||||
var RadioWidget = function(parseTreeNode,options) {
|
||||
this.initialise(parseTreeNode,options);
|
||||
};
|
||||
|
||||
/*
|
||||
Inherit from the base widget class
|
||||
*/
|
||||
RadioWidget.prototype = new Widget();
|
||||
|
||||
/*
|
||||
Render this widget into the DOM
|
||||
*/
|
||||
RadioWidget.prototype.render = function(parent,nextSibling) {
|
||||
// Save the parent dom node
|
||||
this.parentDomNode = parent;
|
||||
// Compute our attributes
|
||||
this.computeAttributes();
|
||||
// Execute our logic
|
||||
this.execute();
|
||||
// Create our elements
|
||||
this.labelDomNode = this.document.createElement("label");
|
||||
this.labelDomNode.setAttribute("class",this.radioClass);
|
||||
this.inputDomNode = this.document.createElement("input");
|
||||
this.inputDomNode.setAttribute("type","radio");
|
||||
if(this.getValue() == this.radioValue) {
|
||||
this.inputDomNode.setAttribute("checked","true");
|
||||
}
|
||||
this.labelDomNode.appendChild(this.inputDomNode);
|
||||
this.spanDomNode = this.document.createElement("span");
|
||||
this.labelDomNode.appendChild(this.spanDomNode);
|
||||
// Add a click event handler
|
||||
$tw.utils.addEventListeners(this.inputDomNode,[
|
||||
{name: "change", handlerObject: this, handlerMethod: "handleChangeEvent"}
|
||||
]);
|
||||
// Insert the label into the DOM and render any children
|
||||
parent.insertBefore(this.labelDomNode,nextSibling);
|
||||
this.renderChildren(this.spanDomNode,null);
|
||||
this.domNodes.push(this.labelDomNode);
|
||||
};
|
||||
|
||||
RadioWidget.prototype.getValue = function() {
|
||||
var tiddler = this.wiki.getTiddler(this.radioTitle);
|
||||
return tiddler && tiddler.getFieldString(this.radioField);
|
||||
};
|
||||
|
||||
RadioWidget.prototype.setValue = function() {
|
||||
if(this.radioField) {
|
||||
var tiddler = this.wiki.getTiddler(this.radioTitle),
|
||||
addition = {};
|
||||
addition[this.radioField] = this.radioValue;
|
||||
this.wiki.addTiddler(new $tw.Tiddler(tiddler,addition));
|
||||
}
|
||||
};
|
||||
|
||||
RadioWidget.prototype.handleChangeEvent = function(event) {
|
||||
if (this.inputDomNode.checked) {
|
||||
this.setValue();
|
||||
}
|
||||
};
|
||||
|
||||
/*
|
||||
Compute the internal state of the widget
|
||||
*/
|
||||
RadioWidget.prototype.execute = function() {
|
||||
// Get the parameters from the attributes
|
||||
this.radioTitle = this.getAttribute("tiddler",this.getVariable("currentTiddler"));
|
||||
this.radioField = this.getAttribute("field");
|
||||
this.radioValue = this.getAttribute("value");
|
||||
this.radioClass = this.getAttribute("class","");
|
||||
if (this.radioClass !== "") {
|
||||
this.radioClass += " ";
|
||||
}
|
||||
this.radioClass += "tw-radio";
|
||||
// Make the child widgets
|
||||
this.makeChildWidgets();
|
||||
};
|
||||
|
||||
/*
|
||||
Selectively refreshes the widget if needed. Returns true if the widget or any of its children needed re-rendering
|
||||
*/
|
||||
RadioWidget.prototype.refresh = function(changedTiddlers) {
|
||||
var changedAttributes = this.computeAttributes();
|
||||
if(changedAttributes.tiddler || changedAttributes.field || changedAttributes.value || changedAttributes["class"]) {
|
||||
this.refreshSelf();
|
||||
return true;
|
||||
} else {
|
||||
var refreshed = false;
|
||||
if(changedTiddlers[this.radioTitle]) {
|
||||
this.inputDomNode.checked = this.getValue();
|
||||
refreshed = true;
|
||||
}
|
||||
return this.refreshChildren(changedTiddlers) || refreshed;
|
||||
}
|
||||
};
|
||||
|
||||
exports.radio = RadioWidget;
|
||||
|
||||
})();
|
||||
@@ -143,29 +143,34 @@ Widget.prototype.evaluateMacroModule = function(name,actualParams,defaultValue)
|
||||
if($tw.utils.hop($tw.macros,name)) {
|
||||
var macro = $tw.macros[name],
|
||||
args = [];
|
||||
var nextAnonParameter = 0, // Next candidate anonymous parameter in macro call
|
||||
paramInfo, paramValue;
|
||||
// Step through each of the parameters in the macro definition
|
||||
for(var p=0; p<macro.params.length; p++) {
|
||||
// Check if we've got a macro call parameter with the same name
|
||||
paramInfo = macro.params[p];
|
||||
paramValue = undefined;
|
||||
for(var m=0; m<actualParams.length; m++) {
|
||||
if(actualParams[m].name === paramInfo.name) {
|
||||
paramValue = actualParams[m].value;
|
||||
if(macro.params.length > 0) {
|
||||
var nextAnonParameter = 0, // Next candidate anonymous parameter in macro call
|
||||
paramInfo, paramValue;
|
||||
// Step through each of the parameters in the macro definition
|
||||
for(var p=0; p<macro.params.length; p++) {
|
||||
// Check if we've got a macro call parameter with the same name
|
||||
paramInfo = macro.params[p];
|
||||
paramValue = undefined;
|
||||
for(var m=0; m<actualParams.length; m++) {
|
||||
if(actualParams[m].name === paramInfo.name) {
|
||||
paramValue = actualParams[m].value;
|
||||
}
|
||||
}
|
||||
// If not, use the next available anonymous macro call parameter
|
||||
while(nextAnonParameter < actualParams.length && actualParams[nextAnonParameter].name) {
|
||||
nextAnonParameter++;
|
||||
}
|
||||
if(paramValue === undefined && nextAnonParameter < actualParams.length) {
|
||||
paramValue = actualParams[nextAnonParameter++].value;
|
||||
}
|
||||
// If we've still not got a value, use the default, if any
|
||||
paramValue = paramValue || paramInfo["default"] || "";
|
||||
// Save the parameter
|
||||
args.push(paramValue);
|
||||
}
|
||||
// If not, use the next available anonymous macro call parameter
|
||||
while(nextAnonParameter < actualParams.length && actualParams[nextAnonParameter].name) {
|
||||
nextAnonParameter++;
|
||||
}
|
||||
if(paramValue === undefined && nextAnonParameter < actualParams.length) {
|
||||
paramValue = actualParams[nextAnonParameter++].value;
|
||||
}
|
||||
// If we've still not got a value, use the default, if any
|
||||
paramValue = paramValue || paramInfo["default"] || "";
|
||||
// Save the parameter
|
||||
args.push(paramValue);
|
||||
}
|
||||
else for(var i=0; i<actualParams.length; ++i) {
|
||||
args.push(actualParams[i].value);
|
||||
}
|
||||
return macro.run.apply(this,args)
|
||||
} else {
|
||||
|
||||
@@ -255,14 +255,23 @@ exports.getModificationFields = function() {
|
||||
};
|
||||
|
||||
/*
|
||||
Return a sorted array of non-system tiddler titles, optionally filtered by a tag
|
||||
Return a sorted array of tiddler titles. Options include:
|
||||
sortField: field to sort by
|
||||
excludeTag: tag to exclude
|
||||
includeSystem: whether to include system tiddlers (defaults to false)
|
||||
*/
|
||||
exports.getTiddlers = function(sortField,excludeTag) {
|
||||
sortField = sortField || "title";
|
||||
var tiddlers = [], t, titles = [];
|
||||
exports.getTiddlers = function(options) {
|
||||
options = options || {};
|
||||
var self = this,
|
||||
sortField = options.sortField || "title",
|
||||
tiddlers = [], t, titles = [];
|
||||
for(t in this.tiddlers) {
|
||||
if($tw.utils.hop(this.tiddlers,t) && !this.isSystemTiddler(t) && (!excludeTag || !this.tiddlers[t].hasTag(excludeTag))) {
|
||||
tiddlers.push(this.tiddlers[t]);
|
||||
if($tw.utils.hop(this.tiddlers,t)) {
|
||||
if(options.includeSystem || !this.isSystemTiddler(t)) {
|
||||
if(!options.excludeTag || !this.tiddlers[t].hasTag(excludeTag)) {
|
||||
tiddlers.push(this.tiddlers[t]);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
tiddlers.sort(function(a,b) {
|
||||
@@ -285,7 +294,7 @@ exports.getTiddlers = function(sortField,excludeTag) {
|
||||
};
|
||||
|
||||
exports.countTiddlers = function(excludeTag) {
|
||||
var tiddlers = this.getTiddlers(null,excludeTag);
|
||||
var tiddlers = this.getTiddlers({excludeTag: excludeTag});
|
||||
return $tw.utils.count(tiddlers);
|
||||
};
|
||||
|
||||
@@ -323,12 +332,17 @@ exports.sortTiddlers = function(titles,sortField,isDescending,isCaseSensitive) {
|
||||
});
|
||||
};
|
||||
|
||||
exports.forEachTiddler = function(/* [sortField,[excludeTag,]]callback */) {
|
||||
/*
|
||||
For every tiddler invoke a callback(title,tiddler) with `this` set to the wiki object. Options include:
|
||||
sortField: field to sort by
|
||||
excludeTag: tag to exclude
|
||||
includeSystem: whether to include system tiddlers (defaults to false)
|
||||
*/
|
||||
exports.forEachTiddler = function(/* [options,]callback */) {
|
||||
var arg = 0,
|
||||
sortField = arguments.length > 1 ? arguments[arg++] : null,
|
||||
excludeTag = arguments.length > 2 ? arguments[arg++] : null,
|
||||
options = arguments.length >= 2 ? arguments[arg++] : {},
|
||||
callback = arguments[arg++],
|
||||
titles = this.getTiddlers(sortField,excludeTag),
|
||||
titles = this.getTiddlers(options),
|
||||
t, tiddler;
|
||||
for(t=0; t<titles.length; t++) {
|
||||
tiddler = this.tiddlers[titles[t]];
|
||||
@@ -757,7 +771,7 @@ exports.parseTextReference = function(title,field,index,options) {
|
||||
if(text === undefined) {
|
||||
text = "";
|
||||
}
|
||||
return this.parseText("text/vnd.tiddlywiki",text,options);
|
||||
return this.parseText("text/vnd.tiddlywiki",text.toString(),options);
|
||||
} else if(index) {
|
||||
text = this.extractTiddlerDataItem(title,index,"");
|
||||
return this.parseText("text/vnd.tiddlywiki",text,options);
|
||||
|
||||
5
core/templates/MOTW.html.tid
Normal file
5
core/templates/MOTW.html.tid
Normal file
@@ -0,0 +1,5 @@
|
||||
title: $:/core/templates/MOTW.html
|
||||
|
||||
\rules only filteredtranscludeinline transcludeinline entity
|
||||
<!-- The following comment is called a MOTW comment and is necessary for the TiddlyIE Internet Explorer extension -->
|
||||
<!-- saved from url=(0021)http://tiddlywiki.com -->
|
||||
@@ -2,8 +2,9 @@ title: $:/core/templates/tiddlywiki5.html
|
||||
|
||||
\rules only filteredtranscludeinline transcludeinline
|
||||
<!doctype html>
|
||||
<html>
|
||||
{{$:/core/templates/MOTW.html}}<html>
|
||||
<head>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge" /> <!-- Force IE standards mode for Intranet and HTA - should be the first meta -->
|
||||
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
|
||||
<meta name="application-name" content="TiddlyWiki" />
|
||||
<meta name="generator" content="TiddlyWiki" />
|
||||
|
||||
@@ -2,22 +2,13 @@ title: $:/core/ui/ControlPanel/Basics
|
||||
tags: $:/tags/ControlPanel
|
||||
caption: Basics
|
||||
|
||||
! Settings
|
||||
|
||||
|TiddlyWiki version |''<<version>>'' |
|
||||
|[[Title of this TiddlyWiki|SiteTitle]] |<$edit-text tiddler="SiteTitle" default="" tag="input"/> |
|
||||
|[[Subtitle|SiteSubtitle]] |<$edit-text tiddler="SiteSubtitle" default="" tag="input"/> |
|
||||
|[[Username for signing edits|$:/status/UserName]] |<$edit-text tiddler="$:/status/UserName" default="" tag="input"/> |
|
||||
|[[Animation duration|$:/config/AnimationDuration]] |<$edit-text tiddler="$:/config/AnimationDuration" default="" tag="input"/> |
|
||||
|[[DefaultTiddlers|$:/DefaultTiddlers]] |Choose which tiddlers are displayed at startup:<br> <$edit-text tag="textarea" tiddler="$:/DefaultTiddlers"/> |
|
||||
|
||||
! Info
|
||||
|
||||
!! Your Stuff
|
||||
|
||||
* Number of tiddlers: <$count filter="[!is[system]]"/>
|
||||
|
||||
!! TiddlyWiki's Stuff
|
||||
|
||||
* Number of system tiddlers: <$count filter="[is[system]]"/>
|
||||
* Number of shadow tiddlers: <$count filter="[is[shadow]]"/>
|
||||
** Number of over-ridden shadow tiddlers: <$count filter="[!is[system]is[shadow]]"/>
|
||||
|Tiddlers |''<$count filter="[!is[system]]"/>'' |
|
||||
|System tiddlers |''<$count filter="[is[system]]"/>'' |
|
||||
|Shadow tiddlers |''<$count filter="[is[shadow]]"/>'' |
|
||||
|Overridden shadow tiddlers |''<$count filter="[!is[system]is[shadow]]"/>'' |
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
title: $:/core/ui/EditTemplate
|
||||
modifier: JeremyRuston
|
||||
|
||||
\define frame-classes()
|
||||
tw-tiddler-frame tw-tiddler-edit-frame $(missingTiddlerClass)$ $(shadowTiddlerClass)$ $(systemTiddlerClass)$
|
||||
|
||||
@@ -6,7 +6,7 @@ tags: $:/tags/PageTemplate
|
||||
<div class="tw-subtitle">{{SiteSubtitle}}</div>
|
||||
|
||||
<div class="tw-page-controls">
|
||||
<$list filter="[is[shadow]!has[draft.of]tag[$:/tags/PageControls]] [!is[shadow]!has[draft.of]tag[$:/tags/PageControls]] [tag[$:/tags/PageControls]]" variable="listItem"><$transclude tiddler=<<listItem>>/></$list>
|
||||
<$list filter="[is[shadow]!has[draft.of]tag[$:/tags/PageControls]] [!is[shadow]!has[draft.of]tag[$:/tags/PageControls]] +[tag[$:/tags/PageControls]]" variable="listItem"><$transclude tiddler=<<listItem>>/></$list>
|
||||
</div>
|
||||
|
||||
{{$:/core/ui/SideBarLists}}
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
title: $:/core/ui/ViewTemplate
|
||||
modifier: JeremyRuston
|
||||
|
||||
\define frame-classes()
|
||||
tw-tiddler-frame $(missingTiddlerClass)$ $(shadowTiddlerClass)$ $(systemTiddlerClass)$
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
title: SiteSubtitle
|
||||
modifier: JeremyRuston
|
||||
|
||||
Tahoe-LAFS edition
|
||||
@@ -1,4 +1,3 @@
|
||||
title: SiteTitle
|
||||
modifier: JeremyRuston
|
||||
|
||||
TiddlyWiki5
|
||||
@@ -1,4 +1,3 @@
|
||||
title: SiteSubtitle
|
||||
modifier: JeremyRuston
|
||||
|
||||
browser-based test runner
|
||||
@@ -1,4 +1,3 @@
|
||||
title: SiteTitle
|
||||
modifier: JeremyRuston
|
||||
|
||||
TiddlyWiki5
|
||||
@@ -113,6 +113,15 @@ describe("WikiText parser tests", function() {
|
||||
|
||||
});
|
||||
|
||||
it("should parse hard linebreak areas", function() {
|
||||
expect(parse("\"\"\"Something\nin the\nway she moves\n\"\"\"\n\n")).toEqual(
|
||||
|
||||
[ { type : 'element', tag : 'p', children : [ { type : 'text', text : 'Something' }, { type : 'element', tag : 'br' }, { type : 'text', text : 'in the' }, { type : 'element', tag : 'br' }, { type : 'text', text : 'way she moves' }, { type : 'element', tag : 'br' } ] } ]
|
||||
|
||||
);
|
||||
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
})();
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
modified: 201305070956
|
||||
title: Acknowledgements
|
||||
modifier: JeremyRuston
|
||||
tags: introduction
|
||||
|
||||
TiddlyWiki5 wouldn't be possible without the ongoing support of the TiddlyWiki user and developer community. Their attention and feedback has made it possible to gain an understanding of what is wanted from the product, and their passion for it has taught me that it is worth the investment that I am making.
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
created: 20130909151600000
|
||||
creator: JeremyRuston
|
||||
modified: 20131128103349581
|
||||
modifier: JeremyRuston
|
||||
modified: 20131211130139832
|
||||
tags: community
|
||||
title: Community
|
||||
type: text/vnd.tiddlywiki
|
||||
@@ -34,6 +32,7 @@ The TiddlyWiki discussion groups are mailing lists for talking about TiddlyWiki:
|
||||
|
||||
! Examples of TiddlyWiki5 being used in the wild
|
||||
|
||||
|!Site |!Description |
|
||||
|http://freedombits.org |A manifesto for the preservation of free speech through the exchange of randomized data |
|
||||
|http://giffmex.org/nt/1johnnotebase.html |A study notebook for the Bible ||
|
||||
; http://freedombits.org
|
||||
: A manifesto for the preservation of free speech through the exchange of randomized data
|
||||
; http://giffmex.org/nt/1johnnotebase.html
|
||||
: A study notebook for the Bible
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
created: 201311011114
|
||||
creator: JeremyRuston
|
||||
modified: 201311301614
|
||||
modifier: JeremyRuston
|
||||
tags: introduction
|
||||
title: Contributing
|
||||
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
created: 20130824141800000
|
||||
creator: JeremyRuston
|
||||
modified: 20131206163714703
|
||||
modifier: JeremyRuston
|
||||
modified: 20131212093542990
|
||||
tags: introduction
|
||||
title: Docs
|
||||
type: text/vnd.tiddlywiki
|
||||
@@ -11,7 +9,7 @@ type: text/vnd.tiddlywiki
|
||||
|
||||
<ul><$list filter="[tag[$tag$]]"><li><$link to={{!!title}}><$view field="title"/></$link></li></$list></ul>
|
||||
\end
|
||||
This is the main documentation hub for TiddlyWiki. See also the DeveloperDocs.
|
||||
This is the main documentation hub for TiddlyWiki. See also [[TiddlyWiki for Developers]].
|
||||
|
||||
! How to use ~TiddlyWiki5
|
||||
|
||||
|
||||
@@ -1,15 +1,13 @@
|
||||
created: 20131119194500000
|
||||
creator: JeremyRuston
|
||||
modified: 20131129094606811
|
||||
modifier: JeremyRuston
|
||||
modified: 20131212094150331
|
||||
tags: introduction
|
||||
title: Download
|
||||
type: text/vnd.tiddlywiki
|
||||
|
||||
Download single file editions of version ''<<version>>'' of TiddlyWiki5:
|
||||
Download single file editions of version ''<<version>>'' of TiddlyWiki:
|
||||
|
||||
|{{$:/editions/tw5.com/snippets/download-empty-button}}|Get started with an empty wiki |
|
||||
|{{$:/snippets/download-wiki-button}}|Download a full copy of this site, including all the documentation |
|
||||
|
||||
For more advanced configurations, you can run [[TiddlyWiki5 on Node.js]].
|
||||
For more advanced configurations, you can run [[TiddlyWiki on Node.js]].
|
||||
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
created: 201309091551
|
||||
creator: JeremyRuston
|
||||
modified: 201309091551
|
||||
modifier: JeremyRuston
|
||||
title: Examples
|
||||
|
||||
Examples of TiddlyWiki5 being used in the wild:
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
created: 20130822172800000
|
||||
creator: JeremyRuston
|
||||
modified: 20131203112520519
|
||||
modifier: JeremyRuston
|
||||
modified: 20131213100612914
|
||||
tags: introduction
|
||||
title: Features
|
||||
type: text/vnd.tiddlywiki
|
||||
@@ -22,8 +20,8 @@ type: text/vnd.tiddlywiki
|
||||
* Many internal improvements:
|
||||
** TiddlyWiki can now be run under [[Node.js]] as well as in the browser, allowing it to be used as a personal web server
|
||||
** An elegant [[microkernel architecture|PluginMechanism]], that allows infinite customisation by replacing and augmenting the core modules
|
||||
** TiddlyWiki5 can directly build both itself and previous (2.x.x) versions of TiddlyWiki from their constituent separate files, without needing external tools
|
||||
** Run the TiddlyWiki5 [[test suite|TestingMechanism]] from http://five.tiddlywiki.com/test.html
|
||||
** TiddlyWiki version 5 can directly build both itself and previous (2.x.x) versions of TiddlyWiki from their constituent separate files, without needing external tools
|
||||
** Run the TiddlyWiki [[test suite|TestingMechanism]] from http://five.tiddlywiki.com/test.html
|
||||
* Last but not least, TiddlyWiki is a rare example of a practical [[quine|Quine]]
|
||||
|
||||
The deep internal changes mean that TiddlyWiki5 is not compatible with previous versions, using different plugins, themes and so on. Content prepared for previous versions of TiddlyWiki will need massaging to work properly in TiddlyWiki5. When asking or searching for help be sure to specify TiddlyWiki5 (or TW5).
|
||||
The deep internal changes mean that TiddlyWiki version 5 is not compatible with previous versions, using different plugins, themes and so on. Content prepared for previous versions of TiddlyWiki will need massaging to work properly. When asking or searching for help be sure to specify TiddlyWiki5 (or TW5).
|
||||
|
||||
7
editions/tw5.com/tiddlers/Future of TiddlyWiki.tid
Normal file
7
editions/tw5.com/tiddlers/Future of TiddlyWiki.tid
Normal file
@@ -0,0 +1,7 @@
|
||||
created: 20131213101024997
|
||||
modified: 20131213101420914
|
||||
title: Future of TiddlyWiki
|
||||
type: text/vnd.tiddlywiki
|
||||
|
||||
TiddlyWiki is designed with the long term needs of its users in mind. Because it is OpenSource and needs no infrastructure, we can be confident that all we'll need to access a TiddlyWiki file even in the far future is an ordinary HTML browser. If you're starting to use TiddlyWiki at the beginning of your career you can be confident that it will carry you through to retirement.
|
||||
|
||||
@@ -1,11 +1,10 @@
|
||||
created: 20131129090249275
|
||||
creator: JeremyRuston
|
||||
modified: 20131206172416371
|
||||
modifier: JeremyRuston
|
||||
modified: 20131212222628625
|
||||
tags: introduction
|
||||
title: GettingStarted
|
||||
type: text/vnd.tiddlywiki
|
||||
|
||||
TiddlyWiki is highly flexible, and there are many different ways to use it. Here we're focusing on using it as a standalone file in the browser, which is a good choice for most users as it doesn't require any special knowledge or tools. For more options you can also run [[TiddlyWiki5 on Node.js]].
|
||||
TiddlyWiki is highly flexible, and there are many different ways to use it. Here we're focusing on using it as a standalone file in the browser, which is a good choice for most users as it doesn't require any special knowledge or tools. For more options you can also run [[TiddlyWiki on Node.js]].
|
||||
|
||||
[[Video Tutorials]] are available, too.
|
||||
|
||||
@@ -21,10 +20,11 @@ Saving changes as described above is quite inconvenient because of the degree of
|
||||
|
||||
! Other ways of saving changes
|
||||
|
||||
[[Saving with Encryption]] explains how to use TiddlyWiki5's built-in encryption to protect your content with a password.
|
||||
[[Saving with Encryption]] explains how to use TiddlyWiki's built-in encryption to protect your content with a password.
|
||||
|
||||
You can also try:
|
||||
|
||||
* [[Saving on iPad/iPhone]] with the custom ''TWEdit'' app
|
||||
* [[Saving on Android]] with the custom ''~AndTidWiki'' app
|
||||
* [[Saving on InternetExplorer]] with the [[TiddlyIE]] extension, or via the [[Windows HTA Hack]]
|
||||
* [[Saving on TiddlySpot]], a free service that lets you use TiddlyWiki online
|
||||
|
||||
@@ -1,21 +1,21 @@
|
||||
created: 20130822170200000
|
||||
creator: JeremyRuston
|
||||
modified: 20131206165151008
|
||||
modifier: JeremyRuston
|
||||
modified: 20131213101007165
|
||||
tags: introduction
|
||||
title: HelloThere
|
||||
type: text/vnd.tiddlywiki
|
||||
|
||||
Welcome to TiddlyWiki5, a reboot of TiddlyWiki, the non-linear personal web notebook first released in 2004. It is a complete interactive wiki in JavaScript that can be run from a [[single HTML file in the browser|SingleFileApplication]] or as a powerful [[Node.js application|Node.js]].
|
||||
Welcome to TiddlyWiki, a complete interactive wiki in JavaScript. It can be used as a [[single HTML file in the browser|SingleFileApplication]] or as a powerful [[Node.js application|Node.js]]. It is highly customisable: the entire user interface is itself implemented in hackable WikiText.
|
||||
|
||||
TiddlyWiki5 is currently in alpha at version //<<version>>// (see the detailed ReleaseHistory). There is a RoadMap for moving to beta and getting to the full release. It is a great time to get involved and support the future development of TiddlyWiki5.
|
||||
This is version <<version>> of TiddlyWiki, a major reboot designed [[for the next 25 years|Future of TiddlyWiki]]. It is currently in beta (see the detailed ReleaseHistory). There is a RoadMap for moving to the full release. It is a great time to get involved and support the future development of TiddlyWiki.
|
||||
|
||||
//TiddlyWiki5 and TiddlyWiki Classic are free, open source projects that depend on [[your love and support|HelpingTiddlyWiki]] for their survival//.
|
||||
//TiddlyWiki is a free, open source project that depends on [[your love and support|HelpingTiddlyWiki]] for their survival//.
|
||||
|
||||
<div class="tw-message-box">
|
||||
<a class="tw-message-icon" href="http://tiddlywiki.com/" target="_blank">{{TiddlyWiki Classic.png}}</a>
|
||||
|
||||
!! TiddlyWiki Classic - http://tiddlywiki.com
|
||||
!! TiddlyWikiClassic - http://classic.tiddlywiki.com
|
||||
|
||||
The deep internal improvements mean that TiddlyWiki5 is not fully compatible with older versions. Existing content will need massaging, while plugins and themes will have to be completely rewritten. The upgrade path will get smoother as TiddlyWiki5 matures.
|
||||
On this site, unless noted otherwise, "~TiddlyWiki" refers to the new version 5, and ~TiddlyWikiClassic is used to identify the older version.
|
||||
|
||||
The deep internal improvements mean that the new version of TiddlyWiki is not fully compatible with TiddlyWikiClassic. Existing content will need massaging, while plugins and themes will have to be completely rewritten. The upgrade path will get smoother as the new version matures.
|
||||
</div>
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
created: 20130825160500000
|
||||
creator: JeremyRuston
|
||||
modified: 20131206172505397
|
||||
modifier: JeremyRuston
|
||||
tags: community
|
||||
title: HelpingTiddlyWiki
|
||||
type: text/vnd.tiddlywiki
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
created: 20131128075743966
|
||||
creator: JeremyRuston
|
||||
modified: 20131128093317966
|
||||
modifier: JeremyRuston
|
||||
tags: introduction
|
||||
title: Philosophy of Tiddlers
|
||||
type: text/vnd.tiddlywiki
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
created: 201311081754007
|
||||
creator: JeremyRuston
|
||||
modified: 201311081754007
|
||||
modifier: JeremyRuston
|
||||
title: Release 5.0.0-alpha.11
|
||||
tags: releasenote
|
||||
released: 201311081806
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
created: 201311081854007
|
||||
creator: JeremyRuston
|
||||
modified: 201311081854007
|
||||
modifier: JeremyRuston
|
||||
title: Release 5.0.0-alpha.12
|
||||
tags: releasenote
|
||||
released: 201311082141
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
created: 201311091122007
|
||||
creator: JeremyRuston
|
||||
modified: 201311091122007
|
||||
modifier: JeremyRuston
|
||||
title: Release 5.0.0-alpha.13
|
||||
tags: releasenote
|
||||
released: 201311091927
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
created: 201311101922007
|
||||
creator: JeremyRuston
|
||||
modified: 201311101922007
|
||||
modifier: JeremyRuston
|
||||
title: Release 5.0.0-alpha.14
|
||||
tags: releasenote
|
||||
released: 201311102315
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
created: 201311122050007
|
||||
creator: JeremyRuston
|
||||
modified: 201311122050007
|
||||
modifier: JeremyRuston
|
||||
title: Release 5.0.0-alpha.15
|
||||
tags: releasenote
|
||||
released: 201311191221
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
created: 20131119125600007
|
||||
creator: JeremyRuston
|
||||
modified: 20131130095531749
|
||||
modifier: JeremyRuston
|
||||
tags: releasenote
|
||||
title: Release 5.0.0-alpha.16
|
||||
type: text/vnd.tiddlywiki
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
created: 20131130151600007
|
||||
creator: JeremyRuston
|
||||
modified: 20131130151631749
|
||||
modifier: JeremyRuston
|
||||
tags: releasenote
|
||||
title: Release 5.0.0-alpha.17
|
||||
type: text/vnd.tiddlywiki
|
||||
|
||||
@@ -1,10 +1,9 @@
|
||||
created: 20131201132300007
|
||||
creator: JeremyRuston
|
||||
modified: 20131206161343895
|
||||
modifier: JeremyRuston
|
||||
tags: releasenote
|
||||
title: Release 5.0.1-alpha
|
||||
type: text/vnd.tiddlywiki
|
||||
released: 201312061753
|
||||
|
||||
//[[See GitHub for detailed change history of this release|https://github.com/Jermolene/TiddlyWiki5/compare/v5.0.0-alpha.17...v5.0.1-alpha]]//
|
||||
|
||||
|
||||
29
editions/tw5.com/tiddlers/Release 5.0.2beta.tid
Normal file
29
editions/tw5.com/tiddlers/Release 5.0.2beta.tid
Normal file
@@ -0,0 +1,29 @@
|
||||
created: 20131211074600007
|
||||
modified: 20131215142414174
|
||||
tags: releasenote
|
||||
title: Release 5.0.2-beta
|
||||
type: text/vnd.tiddlywiki
|
||||
|
||||
//[[See GitHub for detailed change history of this release|https://github.com/Jermolene/TiddlyWiki5/compare/v5.0.1-alpha...v5.0.2-beta]]//
|
||||
|
||||
!! Improvements
|
||||
|
||||
* Added support for [[Hard Linebreaks in WikiText]]
|
||||
* Added a new RadioWidget, contributed by StephanHradek (@Skeeve on GitHub)
|
||||
* Two new savers for InternetExplorer, both contributed by DavidJade (@davidjade on GitHub)
|
||||
** ''tiddlyie'' for [[saving with TiddlyIE|Saving with TiddlyIE]], an equivalent of TiddlyFox for InternetExplorer
|
||||
** ''fsosaver'' that can [[save changes directly with InternetExplorer|Saving on InternetExplorer]] but requires the HTML file to be renamed `*.hta`
|
||||
|
||||
!! Bug fixes
|
||||
|
||||
* Fixed problem deleting tiddlers under the filesystemadaptor
|
||||
* Fixed problem with transcluding fields containing lists or dates (eg, `{{!!tags}}`)
|
||||
* Fixed problem with re-ordering page control tiddlers (ie tiddlers tagged `$:/tags/PageControls`)
|
||||
* Update template used for deploying to TiddlyWeb
|
||||
* Fixed problem with tiddler deletions via the file system adaptor
|
||||
|
||||
!! Internal changes
|
||||
|
||||
* Allowed variable number of arguments to [[JavaScript Macros]]
|
||||
** Contributed by StephanHradek (@Skeeve on GitHub)
|
||||
* Changed the format of plugin tiddlers to remove duplicated information (see the PluginMechanism)
|
||||
@@ -1,7 +1,5 @@
|
||||
created: 20131109105400007
|
||||
creator: JeremyRuston
|
||||
modified: 20131203093653197
|
||||
modifier: JeremyRuston
|
||||
title: ReleaseHistory
|
||||
type: text/vnd.tiddlywiki
|
||||
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
created: 201308221734
|
||||
creator: JeremyRuston
|
||||
modified: 201308221734
|
||||
modifier: JeremyRuston
|
||||
tags: features
|
||||
title: Scalability
|
||||
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
created: 20131128090536894
|
||||
creator: JeremyRuston
|
||||
modified: 20131128093425922
|
||||
modifier: JeremyRuston
|
||||
tags: introduction
|
||||
title: Structuring TiddlyWiki
|
||||
type: text/vnd.tiddlywiki
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
created: 201308230917000
|
||||
creator: JeremyRuston
|
||||
modified: 201311091500004
|
||||
modifier: JeremyRuston
|
||||
tags: community
|
||||
title: TiddlyWiki Hangouts
|
||||
type: text/vnd.tiddlywiki
|
||||
|
||||
@@ -1,21 +1,21 @@
|
||||
created: 20131202102427114
|
||||
creator: JeremyRuston
|
||||
modified: 20131205175047321
|
||||
modifier: JeremyRuston
|
||||
modified: 20131212094500689
|
||||
tags: howto
|
||||
title: Upgrading
|
||||
type: text/vnd.tiddlywiki
|
||||
|
||||
There are several methods for upgrading an existing TiddlyWiki5 document to a new release.
|
||||
There are several methods for upgrading an existing TiddlyWiki document to a new release.
|
||||
|
||||
! Online upgrading
|
||||
|
||||
Note that none of your personal data leaves your browser with this process.
|
||||
|
||||
# Visit http://five.tiddlywiki.com/empty.html
|
||||
# Drag your old TiddlyWiki5 HTML file into the browser window
|
||||
# Drag your old TiddlyWiki HTML file into the browser window
|
||||
#* Your tiddlers should be imported
|
||||
# Save changes to save the new version
|
||||
# Save changes to save the new version.
|
||||
|
||||
This will download a file called ''empty.html'' to your computer. This file is the upgrade of your old file. You may need to open the location where ''empty.html'' was downloaded, rename ''empty.html'' with the name of the old file you are upgrading, and replace the old file by moving the new file in its place.
|
||||
|
||||
//For the moment you'll also need to manually update any plugins that are not included in empty.html://
|
||||
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
created: 201308251449
|
||||
creator: JeremyRuston
|
||||
modified: 201308251449
|
||||
modifier: JeremyRuston
|
||||
tags: concepts
|
||||
title: ContextTiddler
|
||||
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
created: 201308291647
|
||||
creator: JeremyRuston
|
||||
modified: 201308291647
|
||||
modifier: JeremyRuston
|
||||
tags: concepts
|
||||
title: DataTiddlers
|
||||
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
created: 20131129162847412
|
||||
creator: JeremyRuston
|
||||
modified: 20131129162908445
|
||||
modifier: JeremyRuston
|
||||
tags: concepts
|
||||
title: ModuleType
|
||||
type: text/vnd.tiddlywiki
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
created: 20131129162919588
|
||||
creator: JeremyRuston
|
||||
modified: 20131129162935396
|
||||
modifier: JeremyRuston
|
||||
tags: concepts
|
||||
title: Modules
|
||||
type: text/vnd.tiddlywiki
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
created: 20130822080600000
|
||||
creator: JeremyRuston
|
||||
modified: 20131129163429930
|
||||
modifier: JeremyRuston
|
||||
tags: concepts
|
||||
title: SystemTags
|
||||
type: text/vnd.tiddlywiki
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
created: 201308270759
|
||||
creator: JeremyRuston
|
||||
modified: 201311011115
|
||||
modifier: JeremyRuston
|
||||
tags: concepts
|
||||
title: TextReference
|
||||
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
created: 20130825213300000
|
||||
creator: JeremyRuston
|
||||
modified: 20131129162830410
|
||||
modifier: JeremyRuston
|
||||
modified: 20131212095204933
|
||||
tags: concepts
|
||||
title: TiddlerFields
|
||||
type: text/vnd.tiddlywiki
|
||||
@@ -12,6 +10,7 @@ The standard fields are:
|
||||
|
||||
|!Field Name |!Reference |!Description |
|
||||
|`title` |TitleField |{{$:/docs/fields/title}} |
|
||||
|`text` |TextField |{{$:/docs/fields/text}} |
|
||||
|`modified` |ModifiedField |{{$:/docs/fields/modified}} |
|
||||
|`modifier` |ModifierField |{{$:/docs/fields/modifier}} |
|
||||
|`created` |CreatedField |{{$:/docs/fields/created}} |
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
created: 201308270800
|
||||
creator: JeremyRuston
|
||||
modified: 201311242006
|
||||
modifier: JeremyRuston
|
||||
tags: concepts
|
||||
title: TiddlerFilters
|
||||
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
created: 20130825202900000
|
||||
creator: JeremyRuston
|
||||
modified: 20131128093306317
|
||||
modifier: JeremyRuston
|
||||
tags: concepts
|
||||
title: TiddlerLinks
|
||||
type: text/vnd.tiddlywiki
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
created: 201308252135
|
||||
creator: JeremyRuston
|
||||
modified: 201308300907
|
||||
modifier: JeremyRuston
|
||||
tags: concepts
|
||||
title: Tiddlers
|
||||
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
created: 20130822170700000
|
||||
creator: JeremyRuston
|
||||
modified: 20131129163834730
|
||||
modifier: JeremyRuston
|
||||
tags: concepts
|
||||
title: TiddlyWiki
|
||||
type: text/vnd.tiddlywiki
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
created: 201308252136
|
||||
creator: JeremyRuston
|
||||
modified: 201308252136
|
||||
modifier: JeremyRuston
|
||||
tags: concepts
|
||||
title: TiddlyWiki5
|
||||
|
||||
|
||||
@@ -1,12 +1,10 @@
|
||||
created: 20130825214200000
|
||||
creator: JeremyRuston
|
||||
modified: 20131129095040600
|
||||
modifier: JeremyRuston
|
||||
modified: 20131212094058729
|
||||
tags: dev
|
||||
title: TiddlyWikiFolders
|
||||
type: text/vnd.tiddlywiki
|
||||
|
||||
As well as traditional single file wikis, [[TiddlyWiki5 on Node.js]] supports wikis that are stored as a folder of individual tiddler files.
|
||||
As well as traditional single file wikis, [[TiddlyWiki on Node.js]] supports wikis that are stored as a folder of individual tiddler files.
|
||||
|
||||
! Wiki folder files and folders
|
||||
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
created: 20131205155227468
|
||||
creator: JeremyRuston
|
||||
modified: 20131205161350589
|
||||
modifier: JeremyRuston
|
||||
tags: concepts
|
||||
title: WikiText
|
||||
type: text/vnd.tiddlywiki
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
created: 201311010911
|
||||
creator: JeremyRuston
|
||||
modified: 201311010911
|
||||
modifier: JeremyRuston
|
||||
title: BT
|
||||
|
||||
BT (née British Telecom) is the UK's largest telecommunications company. In 2007, [[Osmosoft]] was acquired by BT. JeremyRuston subsequently left BT in 2011.
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
created: 201308281853
|
||||
creator: JeremyRuston
|
||||
modified: 201308281853
|
||||
modifier: JeremyRuston
|
||||
tags: definitions
|
||||
title: CamelCase
|
||||
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
created: 201308281859
|
||||
creator: JeremyRuston
|
||||
modified: 201308281859
|
||||
modifier: JeremyRuston
|
||||
tags: definitions concepts
|
||||
title: ContentType
|
||||
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
created: 201308251549
|
||||
creator: JeremyRuston
|
||||
modified: 201308251604
|
||||
modifier: JeremyRuston
|
||||
tags: definitions
|
||||
title: FederatialLimited
|
||||
|
||||
|
||||
@@ -1,8 +1,15 @@
|
||||
created: 201308251421
|
||||
creator: JeremyRuston
|
||||
modified: 201308251421
|
||||
modifier: JeremyRuston
|
||||
created: 20130825142100000
|
||||
modified: 20131214090859260
|
||||
tags: definitions
|
||||
title: JavaScript
|
||||
type: text/vnd.tiddlywiki
|
||||
|
||||
JavaScript is a computer language originally introduced by browsers as the standard scripting language for the web. It has since been recognised as a powerful language in its own right, and has been adopted widely beyond the browser.
|
||||
JavaScript is a computer language that was originally introduced by browsers as a way of scripting web pages. At first it was considered a poorly designed toy, but over the years has become recognised as a powerful language in its own right, and has been adopted widely beyond the browser.
|
||||
|
||||
JavaScript looks like this:
|
||||
|
||||
```
|
||||
function circleArea(radius) {
|
||||
return radius * 2 * 3.141592653;
|
||||
}
|
||||
```
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
created: 201308251625
|
||||
creator: JeremyRuston
|
||||
modified: 201308251625
|
||||
modifier: JeremyRuston
|
||||
tags: definitions
|
||||
title: JeremyRuston
|
||||
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
created: 201308281902
|
||||
creator: JeremyRuston
|
||||
modified: 201308281902
|
||||
modifier: JeremyRuston
|
||||
tags: definitions
|
||||
title: Jermolene
|
||||
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
created: 201309012131
|
||||
creator: JeremyRuston
|
||||
modified: 201309012131
|
||||
modifier: JeremyRuston
|
||||
tags: demo definitions
|
||||
title: MathML
|
||||
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
created: 201308251307
|
||||
creator: JeremyRuston
|
||||
modified: 201308251307
|
||||
modifier: JeremyRuston
|
||||
tags: definitions
|
||||
title: OpenSource
|
||||
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
created: 201311010913
|
||||
creator: JeremyRuston
|
||||
modified: 201311010924
|
||||
modifier: JeremyRuston
|
||||
title: Osmosoft
|
||||
|
||||
Founded in 2004 by JeremyRuston, Osmosoft was originally a consultancy for software services around TiddlyWiki. Notable engagements included working with Socialtext on [[Socialtext Unplugged|https://www.socialtext.net/open/socialtext_unplugged]].
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
created: 201308221740
|
||||
creator: JeremyRuston
|
||||
modified: 201308231751
|
||||
modifier: JeremyRuston
|
||||
tags: definitions
|
||||
title: SingleFileApplication
|
||||
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
created: 201308221739
|
||||
creator: JeremyRuston
|
||||
modified: 201308231751
|
||||
modifier: JeremyRuston
|
||||
tags: definitions
|
||||
title: SinglePageApplication
|
||||
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
created: 20130825161100000
|
||||
creator: JeremyRuston
|
||||
modified: 20131129093610165
|
||||
modifier: JeremyRuston
|
||||
tags: definitions
|
||||
title: TiddlyFox
|
||||
type: text/vnd.tiddlywiki
|
||||
|
||||
9
editions/tw5.com/tiddlers/definitions/TiddlyIE.tid
Normal file
9
editions/tw5.com/tiddlers/definitions/TiddlyIE.tid
Normal file
@@ -0,0 +1,9 @@
|
||||
created: 20131211220000000
|
||||
modified: 20131211224200000
|
||||
tags: definitions
|
||||
title: TiddlyIE
|
||||
type: text/vnd.tiddlywiki
|
||||
|
||||
TiddlyIE is an extension for Internet Explorer that allows standalone TiddlyWiki files to save their changes directly to the file system. TiddlyIE works with the desktop version of Internet Explorer.
|
||||
|
||||
See [[Saving with TiddlyIE]].
|
||||
@@ -1,7 +1,5 @@
|
||||
created: 201308300842
|
||||
creator: JeremyRuston
|
||||
modified: 201308300842
|
||||
modifier: JeremyRuston
|
||||
tags: definitions
|
||||
title: TiddlySpace
|
||||
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
created: 201308300841
|
||||
creator: JeremyRuston
|
||||
modified: 201308300843
|
||||
modifier: JeremyRuston
|
||||
tags: definitions
|
||||
title: TiddlyWeb
|
||||
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
created: 20131129094739786
|
||||
creator: JeremyRuston
|
||||
modified: 20131129094745311
|
||||
modifier: JeremyRuston
|
||||
modified: 20131212094110082
|
||||
tags: definitions
|
||||
title: Node.js
|
||||
type: text/vnd.tiddlywiki
|
||||
@@ -12,4 +10,4 @@ For TiddlyWiki, [[Node.js]] means that we can have a single code base that can r
|
||||
|
||||
For end users, [[Node.js]] is no more complicated to install than a web browser, but unlocks powerful capabilities such as the ability to run TiddlyWiki as a web server that you can connect to from other devices.
|
||||
|
||||
See [[TiddlyWiki5 on Node.js]] for more details.
|
||||
See [[TiddlyWiki on Node.js]] for more details.
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
created: 201308251500
|
||||
creator: JeremyRuston
|
||||
modified: 201308251621
|
||||
modifier: JeremyRuston
|
||||
tags: deserializers dev
|
||||
title: TiddlerFiles
|
||||
|
||||
|
||||
25
editions/tw5.com/tiddlers/dev/Building TiddlyWikiClassic.tid
Normal file
25
editions/tw5.com/tiddlers/dev/Building TiddlyWikiClassic.tid
Normal file
@@ -0,0 +1,25 @@
|
||||
created: 20131129094452285
|
||||
modified: 20131213100714351
|
||||
tags: howto
|
||||
title: Building TiddlyWikiClassic
|
||||
type: text/vnd.tiddlywiki
|
||||
|
||||
TiddlyWiki5 can be used to build older 2.x.x versions of TiddlyWikiClassic from their constituent components. Doing so involves these features:
|
||||
|
||||
* The `tiddlywiki/classictools` plugin, containing a deserializer module which allows tiddlers to be loaded from TiddlyWiki 2.x.x `.recipe` files
|
||||
* The `stripcomments` format for the ViewWidget, which strips single line JavaScript comments starting `//#`
|
||||
* The `stripTitlePrefix='yes'` attribute of the FieldsWidget, which removes prefixes wrapped in curly braces from the `title` attribute
|
||||
** For example, `{tiddler}HelloThere` would be transformed to `HelloThere`
|
||||
|
||||
! Usage
|
||||
|
||||
TiddlyWikiClassic is built from the command line by running [[TiddlyWiki on Node.js]]. A typical usage would be:
|
||||
|
||||
```
|
||||
node ../../tiddlywiki.js \
|
||||
--verbose \
|
||||
--load <path_to_recipe_file> \
|
||||
--rendertiddler $:/core/templates/tiddlywiki2.template.html <path_to_write_index_file> text/plain \
|
||||
|| exit 1
|
||||
```
|
||||
|
||||
17
editions/tw5.com/tiddlers/dev/JavaScript Macros.tid
Normal file
17
editions/tw5.com/tiddlers/dev/JavaScript Macros.tid
Normal file
@@ -0,0 +1,17 @@
|
||||
created: 20131211222303769
|
||||
modified: 20131211225411570
|
||||
tags: dev
|
||||
title: JavaScript Macros
|
||||
type: text/vnd.tiddlywiki
|
||||
|
||||
Macros can be implemented as JavaScript modules as well as via the [[wikitext syntax|Macros in WikiText]].
|
||||
|
||||
JavaScript macros are modules with their ''module-type'' field set to ''macro''. They must export these three properties:
|
||||
|
||||
* ''name'': A string giving the name used to invoke the macro
|
||||
* ''params'': An array of objects with the following properties:
|
||||
** //name//: name of the parameter
|
||||
** //default//: (optional) default value for the parameter
|
||||
* ''run'': Function called when the macro requires evaluation. The parameters are pulled from the macro call and arranged according to the ''params'' array. The ''run'' function should return the string value of the macro. When invoked, `this` points to the widget node invoking the macro.
|
||||
|
||||
Note that if the ''params'' array is missing or blank, then all the supplied parameters are passed to the `run()` method.
|
||||
@@ -1,7 +1,5 @@
|
||||
created: 20131130132123707
|
||||
creator: JeremyRuston
|
||||
modified: 20131130132123707
|
||||
modifier: JeremyRuston
|
||||
tags: dev
|
||||
title: Releasing a new version of TiddlyWiki5
|
||||
type: text/vnd.tiddlywiki
|
||||
|
||||
26
editions/tw5.com/tiddlers/dev/TiddlyWiki for Developers.tid
Normal file
26
editions/tw5.com/tiddlers/dev/TiddlyWiki for Developers.tid
Normal file
@@ -0,0 +1,26 @@
|
||||
created: 20131203074550710
|
||||
modified: 20131212093713249
|
||||
tags: introduction dev
|
||||
title: TiddlyWiki for Developers
|
||||
type: text/vnd.tiddlywiki
|
||||
|
||||
TiddlyWiki is published as OpenSource which means that anyone can read the code and contribute to its development. It's a big, complex piece of software and can be overwhelming to newcomers.
|
||||
|
||||
! Resources
|
||||
|
||||
If you're interested in understanding more about the internal operation of TiddlyWiki, start by reviewing [[TiddlyWiki for Developers]] and then read the code -- start with the boot kernel [[$:/boot/boot.js]].
|
||||
|
||||
! The one thing you need to know
|
||||
|
||||
TiddlyWiki's architecture is very different from an HTML page written using jQuery. This section concisely explains what TiddlyWiki does differently. It may not make much sense on the first reading.
|
||||
|
||||
The key to understanding how it works internally is to see that the RefreshMechanism requires that any region of the DOM can be regenerated at any time. This means that the entire state of the user interface must reside in the tiddler store, and not in the DOM.
|
||||
|
||||
It also determines the standard UI flow:
|
||||
|
||||
# An event handler on a widget is triggered
|
||||
# The event handler can manipulate the DOM nodes directly created by the widget, and/or modify the state of the tiddler store
|
||||
# The core then issues a store change event which triggers the refresh cycle
|
||||
# Each widget in the tree then gets a chance to refresh itself to reflect the changes in the store if they need to
|
||||
|
||||
From a technical perspective, TiddlyWiki is a fairly classic MVC architecture, with strict separation of concerns. The model is the tiddler store, the view is a rendering tree (such as the one created from [[$:/core/ui/PageMacros]] in startup.js), and the controller is the core code itself.
|
||||
@@ -1,8 +1,6 @@
|
||||
created: 20131129094353704
|
||||
creator: JeremyRuston
|
||||
modified: 20131129100329076
|
||||
modifier: JeremyRuston
|
||||
title: TiddlyWiki5 on Node.js
|
||||
modified: 20131212094217023
|
||||
title: TiddlyWiki on Node.js
|
||||
type: text/vnd.tiddlywiki
|
||||
|
||||
! Installation
|
||||
@@ -1,7 +1,5 @@
|
||||
created: 201308251618
|
||||
creator: JeremyRuston
|
||||
modified: 201308262048
|
||||
modifier: JeremyRuston
|
||||
tags: dev
|
||||
title: TiddlyWiki5 Development Environment
|
||||
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
created: 20131202081424080
|
||||
creator: JeremyRuston
|
||||
modified: 20131203093908677
|
||||
modifier: JeremyRuston
|
||||
tags: dev
|
||||
title: TiddlyWiki5 Versioning
|
||||
type: text/vnd.tiddlywiki
|
||||
|
||||
@@ -1,26 +0,0 @@
|
||||
created: 20131203074550710
|
||||
creator: JeremyRuston
|
||||
modified: 20131203075203153
|
||||
modifier: JeremyRuston
|
||||
tags: introduction dev
|
||||
title: TiddlyWiki5 for Developers
|
||||
type: text/vnd.tiddlywiki
|
||||
|
||||
TiddlyWiki5 is published as OpenSource which means that anyone can read the code and contribute to its development. It's a big, complex piece of software and can be overwhelming to newcomers.
|
||||
|
||||
! Resources
|
||||
|
||||
! The one thing you need to know
|
||||
|
||||
TiddlyWiki5's architecture is very different from an HTML page written using jQuery. This section concisely explains what TiddlyWiki5 does differently. It may not make much sense on the first reading.
|
||||
|
||||
The key to understanding how TW5 works internally is to see that the RefreshMechanism requires that any region of the DOM can be regenerated at any time. This means that the entire state of the user interface must reside in the tiddler store, and not in the DOM.
|
||||
|
||||
It also determines the standard UI flow:
|
||||
|
||||
# An event handler on a widget is triggered
|
||||
# The event handler can manipulate the DOM nodes directly created by the widget, and/or modify the state of the tiddler store
|
||||
# The core then issues a store change event which triggers the refresh cycle
|
||||
# Each widget in the tree then gets a chance to refresh itself to reflect the changes in the store if they need to
|
||||
|
||||
From a technical perspective, TiddlyWiki5 is a fairly classic MVC architecture, with strict separation of concerns. The model is the tiddler store, the view is a rendering tree (such as the one created from $:/core/ui/PageMacros in startup.js), and the controller is the TW5 core code itself.
|
||||
@@ -1,13 +1,9 @@
|
||||
created: 20130825162100000
|
||||
creator: JeremyRuston
|
||||
modified: 20131203074943344
|
||||
modifier: JeremyRuston
|
||||
modified: 20131212093605368
|
||||
tags: dev
|
||||
title: TiddlyWikiArchitecture
|
||||
type: text/vnd.tiddlywiki
|
||||
|
||||
The heart of TiddlyWiki can be seen as an extensible representation transformation engine for text and images. Given the text of a tiddler and its associated ContentType, the engine can produce a rendering of the tiddler in a new ContentType. Furthermore, it can efficiently selectively update the rendering to track any changes in the tiddler or its dependents.
|
||||
|
||||
The primary use of the engine is to convert raw `text/vnd.tiddlywiki` WikiText into a `text/html` or `text/plain` representation for display. The transclusion and templating features of WikiText allow the engine to also be used to generate TiddlyWiki HTML files from raw tiddlers.
|
||||
|
||||
If you're interested in understanding more about the internal operation of TiddlyWiki, start by reviewing [[TiddlyWiki5 for Developers]] and then read the code -- start with the boot kernel [[$:/boot/boot.js]].
|
||||
The primary use of the engine is to convert raw `text/vnd.tiddlywiki` WikiText into a `text/html` or `text/plain` representation for display. The transclusion and templating features of WikiText allow the engine to also be used to generate TiddlyWiki HTML files from raw tiddlers.
|
||||
@@ -1,7 +1,5 @@
|
||||
created: 20130825214500000
|
||||
creator: JeremyRuston
|
||||
modified: 20131129095206930
|
||||
modifier: JeremyRuston
|
||||
tags: edition
|
||||
title: Working with the TiddlyWiki5 repository
|
||||
type: text/vnd.tiddlywiki
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
created: 20130828190200000
|
||||
creator: JeremyRuston
|
||||
modified: 20131129095228854
|
||||
modifier: JeremyRuston
|
||||
tags: howto
|
||||
title: TiddlyWiki5 Static Site Generation
|
||||
type: text/vnd.tiddlywiki
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
created: 20131129100250644
|
||||
creator: JeremyRuston
|
||||
modified: 20131129100250644
|
||||
modifier: JeremyRuston
|
||||
tags: howto
|
||||
title: TiddlyWiki5 in the Sky for TiddlyWeb
|
||||
type: text/vnd.tiddlywiki
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
created: 201308251620
|
||||
creator: JeremyRuston
|
||||
modified: 201308251620
|
||||
modifier: JeremyRuston
|
||||
tags: features
|
||||
title: ImportTiddlers
|
||||
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
created: 201308300925
|
||||
creator: JeremyRuston
|
||||
modified: 201308300927
|
||||
modifier: JeremyRuston
|
||||
tags: fields
|
||||
title: ListField
|
||||
|
||||
|
||||
@@ -1,27 +0,0 @@
|
||||
created: 20131129094452285
|
||||
creator: JeremyRuston
|
||||
modified: 20131129094514823
|
||||
modifier: JeremyRuston
|
||||
tags: howto
|
||||
title: Building classic TiddlyWiki with TiddlyWiki5
|
||||
type: text/vnd.tiddlywiki
|
||||
|
||||
TiddlyWiki5 can be used to build older 2.x.x versions of TiddlyWiki from their constituent components. Doing so involves these additional features over and above those used for building TiddlyWiki5:
|
||||
|
||||
* The `tiddlywiki2/loadrecipe` plugin, containing a deserializer module which allows tiddlers to be loaded from TiddlyWiki 2.x.x `.recipe` files
|
||||
* The `tiddlywiki2/stripcomments` plugin, containing a new viewer format for the `<$view>` widget that strips single line JavaScript comments starting `//#`
|
||||
* The `stripTitlePrefix='yes'` attribute of the `<$fields>` widget, which removes prefixes wrapped in curly braces from the `title` attribute
|
||||
** For example, `{tiddler}HelloThere` would be transformed to `HelloThere`
|
||||
|
||||
! Usage
|
||||
|
||||
TiddlyWikiClassic is built from the command line by running [[TiddlyWiki5 on Node.js]]. A typical usage would be:
|
||||
|
||||
```
|
||||
node ../../tiddlywiki.js \
|
||||
--verbose \
|
||||
--load <path_to_recipe_file> \
|
||||
--rendertiddler $:/core/templates/tiddlywiki2.template.html <path_to_write_index_file> text/plain \
|
||||
|| exit 1
|
||||
```
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
created: 201308251614
|
||||
creator: JeremyRuston
|
||||
modified: 201308251614
|
||||
modifier: JeremyRuston
|
||||
tags: howto
|
||||
title: How to use TiddlyWiki5 as a standalone HTML file with AndTidWiki
|
||||
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
created: 201311242206
|
||||
creator: JeremyRuston
|
||||
modified: 201308251607
|
||||
modifier: JeremyRuston
|
||||
tags: howto
|
||||
title: How to build a TiddlyWiki5 from individual tiddlers
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user