1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2026-01-24 03:44:41 +00:00

Compare commits

...

115 Commits

Author SHA1 Message Date
Jermolene
b8c9422161 Version number update for 5.0.2-beta 2013-12-15 14:35:15 +00:00
Jermolene
d7ebd461f2 Update for beta 2013-12-15 14:25:02 +00:00
Jermolene
57adbe5bf7 Fixed typo in hardlinebreak parser 2013-12-14 17:42:50 +00:00
Jermolene
34e6d79ef6 Tweak background colour of HTML-in-SVG demo
To make it look different from the page background colour
2013-12-14 17:38:46 +00:00
Jermolene
713d6945c6 Misplaced space 2013-12-14 17:22:26 +00:00
Jermolene
ef9175e7bc Remove debugging info 2013-12-14 17:07:47 +00:00
Jermolene
6a8feb216a Add parser rule for hard linebreaks 2013-12-14 17:05:57 +00:00
Jermolene
b1e7ba29f1 Improved static content for tw5.com 2013-12-14 15:17:34 +00:00
Jermolene
79c8935aef Style cleanups for MOTW
@davidjade I assume these changes are all safe from the BHO’s point of
view? Many thanks
2013-12-14 09:53:39 +00:00
Jermolene
8496337d30 Remove "coreversion" metadata from plugins
There’s no support for it yet, so it’s confusing.
2013-12-14 09:49:39 +00:00
Jermolene
2126ce1d17 Docs update 2013-12-14 09:46:10 +00:00
Jermolene
3f06384516 Adjusted plugin encoding so that the JSON text no longer duplicates the fields 2013-12-14 09:46:02 +00:00
Jermolene
053e09af6e Docs update 2013-12-14 09:25:11 +00:00
Jermolene
c190b0f1ea Docs updates 2013-12-13 10:16:37 +00:00
Jermolene
819843e4b0 Docs updates 2013-12-12 22:38:19 +00:00
Jermolene
6386e60896 Docs for the radio widget 2013-12-12 20:37:05 +00:00
Jermolene
7c9b920e26 More style adjustments 2013-12-12 20:36:54 +00:00
Jermolene
ae4a2b58ed Complete renaming the radio widget 2013-12-12 19:49:43 +00:00
Jermolene
c73a7af95b Remove file mistakenly included in previous commit 2013-12-12 19:49:29 +00:00
Jermolene
1420aa2f58 Complete renamign the 'fieldradio' widget to 'radio' 2013-12-12 19:41:40 +00:00
Jermolene
0814f3623d Rename 'fieldradio' widget to just 'radio'
We’ve already got two widgets starting “field…”, and “radio” is more
consistent with the existing “checkbox” widget.
2013-12-12 19:40:27 +00:00
Jermolene
382d7e4449 Coding style consistency 2013-12-12 19:39:02 +00:00
Jermolene
e2cd611e45 Typo correction 2013-12-12 19:37:57 +00:00
Jermolene
bb03bb942f Merge branch 'fieldradio' of https://github.com/Skeeve/TiddlyWiki5 into Skeeve-fieldradio 2013-12-12 19:23:39 +00:00
Jermolene
fd996bad20 Fix problem with edit-text widget gaining class="undefined"
Fixes #269
2013-12-12 18:52:51 +00:00
Jermolene
3f3cac12ba Docs update
@davidjade - is what I’ve said about the FSO saver reasonable? I’m
conscious that it doesn’t really explain why TiddlyIE is better.
2013-12-12 18:45:20 +00:00
Jeremy Ruston
761b66028d Merge pull request #276 from davidjade/master
Added TiddlyIE and FSO saver modules
2013-12-12 10:18:30 -08:00
Jermolene
7e151a98da Docs update
Fixes #247

@giffmex - I appreciate that I haven’t fixed everything you mentioned
2013-12-12 18:16:16 +00:00
Jeremy Ruston
e537457d4b Merge pull request #265 from shakerlxxv/sign-cla
sign contributor license agreement
2013-12-12 09:19:35 -08:00
Jermolene
e686d62400 Docs updates 2013-12-12 17:19:17 +00:00
Jermolene
ae6d1b1685 Major refactoring of the navigator widget
Cleans things up, and hopefully fixes #267
2013-12-12 15:17:12 +00:00
Jermolene
49b3165fbd Fix occasional crash from trying to save a tiddler after it has been deleted 2013-12-12 15:16:44 +00:00
Jermolene
6a21965cee Docs updates 2013-12-12 10:38:00 +00:00
Jermolene
b9faadbbc9 Docs updates 2013-12-12 09:48:08 +00:00
Jermolene
c610161455 Adjust link colour
It was a bit too bright
2013-12-12 09:47:58 +00:00
Jermolene
6dbd178378 Merge branch 'issue_270' of https://github.com/Skeeve/TiddlyWiki5 into Skeeve-issue_270 2013-12-11 22:19:19 +00:00
Jermolene
77bca22d42 Docs update 2013-12-11 22:14:40 +00:00
Jermolene
9f058925f7 Fix problem with deleting tiddlers with the filesystemadaptor
Fixes #266
2013-12-11 22:02:34 +00:00
Jermolene
1b75242345 Fix up caller of wiki.forEachTiddler() 2013-12-11 22:01:20 +00:00
Jermolene
6298c7aa43 Refactor wiki.forEachTiddler() and wiki.getTiddlers() to take an options parameter 2013-12-11 22:01:02 +00:00
Stephan Hradek
853cca906c allowing variable number of arguments for non-argument macros 2013-12-11 22:59:52 +01:00
David Jade
cffe9375b2 Added TiddlyIE and FSO saver modules
Modified tiddlywiki5 template to support TiddlyIE and HTAs
Added empty.hta creation to bld scripts
Added TiddlyIE topics
2013-12-11 12:45:35 -08:00
Jermolene
b8897f86fb Ensure that tiddler manipulations affect the history
Previously edit tiddler etc wouldn’t actually navigate to the new
tiddler
2013-12-11 16:30:25 +00:00
Jermolene
409311b61e Docs update 2013-12-11 16:06:58 +00:00
Jermolene
d11cda4854 Rearrange control panel
Introduce version number too
2013-12-11 16:06:52 +00:00
Jermolene
6a71b399b0 Fix problem with transcluding non-string fields
Transcluding date or list fields (like `modified` or `tags`) was
crashing.
2013-12-11 15:51:32 +00:00
Jermolene
2e188a48f4 Docs update 2013-12-11 15:50:58 +00:00
Jermolene
b4733414e5 Improve upgrading instructions
Thanks @giffmex
2013-12-11 14:31:57 +00:00
Jermolene
67072371a0 Get rid of extraneous logging on filesystemadaptor 2013-12-11 13:13:48 +00:00
Jermolene
a9c209c62e Docs updates to get ready for beta
There will be quite a lot more of these updates…
2013-12-11 13:13:37 +00:00
Jermolene
bc84df1707 Formatting for definition lists 2013-12-11 13:12:56 +00:00
Jermolene
062822d45c Fix file system behaviour for loading new tiddlers
We don’t need to load tiddlers because they will all have been loaded
during bootup, or been created through the file system adaptor.
2013-12-11 11:45:15 +00:00
Jermolene
2e0e8a879f Docs update 2013-12-11 07:57:19 +00:00
Jermolene
2ffcbb76eb Remove modifier and creator fields from tiddlers in tw5.com
Keeps things tidier
2013-12-11 07:57:12 +00:00
Jermolene
50e1727ef7 Stop falling back to anonymous username
The `serve` command used to fallback the username parameter to
“ANONYMOUS” if it was not provided. Better is just to not set a
username if it is not provided; newly created tiddlers won’t get a
‘modifier’ field at all.
2013-12-11 07:45:36 +00:00
Jermolene
7a99fb1250 Update template used for deployment to TiddlyWeb
Missed from 5.0.0-alpha.16
2013-12-11 07:37:08 +00:00
Brian Shaver
e6e47ca83d sign contributor license agreement 2013-12-07 18:23:28 -05:00
Jermolene
489b40314b Docs update 2013-12-07 08:59:38 +00:00
Jermolene
14cf9ad24a Fix typo preventing page controls from being reordered 2013-12-07 08:59:32 +00:00
Jermolene
428e27d4bf Prepare version number for 5.0.2 release 2013-12-07 08:59:16 +00:00
Jermolene
0edf46dee1 Update 5.0.1-alpha release date 2013-12-06 17:54:25 +00:00
Jermolene
c38cd500f6 Readme update 2013-12-06 17:52:50 +00:00
Jermolene
3da825c6e1 Version number update for 5.0.1-alpha 2013-12-06 17:50:39 +00:00
Jermolene
559f9da9b4 Version number update for 5.0.1 2013-12-06 17:33:38 +00:00
Jermolene
8f6e3c641d More docs updates 2013-12-06 17:29:46 +00:00
Jermolene
aae8587660 Docs updates 2013-12-06 17:09:30 +00:00
Jermolene
5bb7ee2f88 Docs updates 2013-12-06 16:24:11 +00:00
Jeremy Ruston
0a93edb1b6 Merge pull request #249 from Skeeve/quotes
added quote rules
2013-12-06 01:16:39 -08:00
Stephan Hradek
b0ff8bee6a as requested - quote.js removed because of quotelist - do not forget to add some css classes 2013-12-06 09:57:56 +01:00
Jermolene
48f8046cf5 Fixed problem with cancelling editing the tiddler $:/StoryList 2013-12-06 08:45:24 +00:00
Jermolene
d4e6516a61 Improved upgrading docs 2013-12-06 07:12:35 +00:00
Jermolene
1fddcf075f Big docs update
Finally sorting out the wikitext documentation
2013-12-05 16:21:10 +00:00
Jermolene
d64c37c3b7 Block quote styles 2013-12-05 16:20:37 +00:00
Jermolene
ffcf2bfaac Missing comma
Omitted from 4d4a0e01b4
2013-12-05 16:20:22 +00:00
Jeremy Ruston
4d4a0e01b4 Merge pull request #258 from Skeeve/quotelist
inserted > into lists
2013-12-05 07:16:05 -08:00
Jermolene
b37a139aa7 Typo that prevented edit widget tiddler attribute from working 2013-12-05 10:37:40 +00:00
Jermolene
17277cf8fd Docs update 2013-12-05 10:37:23 +00:00
Stephan Hradek
374743883d inserted > into lists 2013-12-05 00:31:55 +01:00
Stephan Hradek
d739b6939a added core/modules/widgets/fieldradio.js 2013-12-05 00:15:06 +01:00
Jermolene
49ade66540 Extend navigator widget to allow target tiddler to be specified for certain events
Now the edit tiddler, delete tiddler, save tiddler and cancel tiddler
events can all be passed the tiddler title as the message param.
2013-12-04 13:09:26 +00:00
Jermolene
09e14dd8ad Docs updates 2013-12-03 18:05:45 +00:00
Jermolene
c30392c0c5 Docs update 2013-12-03 11:12:57 +00:00
Jermolene
fa8cc1c512 Update docs 2013-12-03 10:11:03 +00:00
Jermolene
21f795b542 Include the release date in the release history 2013-12-03 10:10:56 +00:00
Jermolene
1363d24e86 Retrospectively add a release date to earlier release notes 2013-12-03 10:10:41 +00:00
Jermolene
4cffa58df3 Fix viewing of date fields 2013-12-03 10:09:58 +00:00
Jermolene
7d0b930335 Update verbump script to include version number in commit message
Easier to find.
2013-12-03 10:09:37 +00:00
Jermolene
f3954d374d Add error reporting for the syncer module
Things were failing silently.
2013-12-03 09:35:02 +00:00
Jermolene
16170ce504 Blank out Google Analytics account information from clientserver edition
This also fixes a recently introduced problem: when I removed the last
`.tid` file from the `editions/clientserver/tiddlers/` directory, git
promptly stopped recording the directory in commits, and so newly
downloaded copies of the repo lacked the directory. That caused the
filesystemadaptor to fail to save newly created tiddlers.
2013-12-03 09:20:09 +00:00
Jermolene
9dcbdb5297 Move the docs to the right place 2013-12-03 09:17:59 +00:00
Jermolene
ecdfce1985 Fix tiddler layout on narrow viewports 2013-12-03 09:10:07 +00:00
Jermolene
88e0bd3251 Docs update 2013-12-03 09:05:53 +00:00
Jermolene
5ccd4988aa Update TiddlyDocs documentation 2013-12-02 20:30:38 +00:00
Jermolene
1e99f6cb67 Updated docs 2013-12-02 14:36:38 +00:00
Jermolene
41fc06ab4d Docs updates 2013-12-02 09:59:44 +00:00
Jermolene
b149ab47f4 Refactor importing to to use new wiki.importTiddler method 2013-12-02 09:59:38 +00:00
Jermolene
1b99dbb677 Add wiki.importTiddler()
Exactly like addTiddler except that it rejects plugins that are older
than the currently installed version.
2013-12-02 09:59:17 +00:00
Jermolene
c4814cec91 Include plugin version numbers in control panel 2013-12-02 09:58:44 +00:00
Jermolene
698efb66bb Update the version number preparatory to 5.0.1-alpha
The “prerelease” string will be changed to “alpha” when 5.0.1 is
released.
2013-12-02 09:58:33 +00:00
Jermolene
7a4abba9fd Ensure system tiddlers are imported
We no longer generate a separate “systemArea” for system tiddlers but
we still need to import it for older wikis
2013-12-02 09:57:54 +00:00
Jermolene
026a27c1ab Split out the parsing of semantic version strings 2013-12-02 09:57:19 +00:00
Jermolene
34ae1387a5 Expand the theme switcher in the control panel 2013-12-01 21:57:19 +00:00
Stephan Hradek
62b9fb336b fixed a small bug related to closing wiki-tag - no really 2013-12-01 22:05:49 +01:00
Stephan Hradek
8ed364ed72 fixed a small bug related to closing wiki-tag 2013-12-01 22:01:21 +01:00
Jermolene
b1aadc7e94 Docs update 2013-12-01 20:52:34 +00:00
Jermolene
eb41ca578d Fallback to a list of default themes
Avoids the situation where an empty wiki uses the vanilla theme unless
you explicitly apply a different theme.
2013-12-01 20:28:56 +00:00
Stephan Hradek
2ec58f7fa2 added quote rules 2013-12-01 21:21:15 +01:00
Jermolene
6be7e2c30e Resolve conflict 2013-12-01 20:11:40 +00:00
Jeremy Ruston
7ebb8702b2 Merge pull request #248 from davidjade/master
sign cla
2013-12-01 12:02:09 -08:00
David Jade
eac07fb6c3 sign cla 2013-12-01 11:46:53 -08:00
Jermolene
3a07cd4c55 Docs update
Added a link to @giffmex’s Bible study notebook, and updated the link
to Ton’s guide to building top menus and toolbars.
2013-12-01 13:35:59 +00:00
Jermolene
a12310f225 Fixed problem with rearranging $:/tags/PageControls/ 2013-12-01 13:25:48 +00:00
Stephan Hradek
593503fe09 sign contributor license agreement 2013-11-30 22:31:00 +01:00
Jermolene
7f4dffca77 Clarify location of license files 2013-11-30 16:25:15 +00:00
Jermolene
f9f9c96ca1 Update version number and ribbon colour for alpha-18 2013-11-30 15:23:43 +00:00
220 changed files with 1813 additions and 1090 deletions

View File

@@ -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
View File

@@ -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 \

View File

@@ -344,14 +344,35 @@ $tw.utils.resolvePath = function(sourcepath,rootpath) {
};
/*
Returns true if the `actual` version is greater than or equal to the `required` version. Both are in `x.y.z` format.
Parse a semantic version string into its constituent parts
*/
$tw.utils.checkVersions = function(required,actual) {
var targetVersion = required.split("."),
currVersion = actual.split("."),
diff = [parseInt(targetVersion[0],10) - parseInt(currVersion[0],10),
parseInt(targetVersion[1],10) - parseInt(currVersion[1],10),
parseInt(targetVersion[2],10) - parseInt(currVersion[2],10)];
$tw.utils.parseVersion = function(version) {
var match = /^((\d+)\.(\d+)\.(\d+))(?:-([\dA-Za-z\-]+(?:\.[\dA-Za-z\-]+)*))?(?:\+([\dA-Za-z\-]+(?:\.[\dA-Za-z\-]+)*))?$/.exec(version);
if(match) {
return {
version: match[1],
major: parseInt(match[2],10),
minor: parseInt(match[3],10),
patch: parseInt(match[4],10),
prerelease: match[5],
build: match[6]
};
} else {
return null;
}
};
/*
Returns true if the version string A is greater than the version string B
*/
$tw.utils.checkVersions = function(versionStringA,versionStringB) {
var versionA = $tw.utils.parseVersion(versionStringA),
versionB = $tw.utils.parseVersion(versionStringB),
diff = [
versionA.major - versionB.major,
versionA.minor - versionB.minor,
versionA.patch - versionB.patch
];
return (diff[0] > 0) ||
(diff[0] === 0 && diff[1] > 0) ||
(diff[0] === 0 && diff[1] === 0 && diff[2] > 0);
@@ -1211,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 {

View File

@@ -1,4 +1,4 @@
<h1 class=''>Contributing to <a class=' tw-tiddlylink tw-tiddlylink-resolves' href='http://five.tiddlywiki.com/static/TiddlyWiki5.html'>TiddlyWiki5</a></h1><p><a class=' tw-tiddlylink tw-tiddlylink-resolves' href='http://five.tiddlywiki.com/static/TiddlyWiki5.html'>TiddlyWiki5</a> welcomes contributions to its code and documentation via <a class='tw-tiddlylink-external' href='https://github.com/Jermolene/TiddlyWiki5' target='_blank'>GitHub</a>. Please take a moment to read these notes to help make the process as smooth as possible.</p><h2 class=''>Bug Reports</h2><p>From the perspective of the developers, a bug report that says little more than &quot;it doesn't work&quot; can be frustrating. For effective debugging, we need as much information as possible. At a minimum, please try to include:</p><ul><li>A descriptive title</li><li>A summary</li><li>Steps to reproduce</li><li>Expected behaviour</li><li>Context (OS, browser etc.)</li></ul><p>There's a lot of good material on the web about bug reports:</p><ul><li><a class='tw-tiddlylink-external' href='http://mhay68.tumblr.com/post/1648223018/what-makes-a-good-bug-report' target='_blank'>http://mhay68.tumblr.com/post/1648223018/what-makes-a-good-bug-report</a></li><li><a class='tw-tiddlylink-external' href='http://www.chiark.greenend.org.uk/~sgtatham/bugs.html' target='_blank'>http://www.chiark.greenend.org.uk/~sgtatham/bugs.html</a></li></ul><h2 class=''>Pull Requests</h2><p>Like other <a class=' tw-tiddlylink tw-tiddlylink-resolves' href='http://five.tiddlywiki.com/static/OpenSource.html'>OpenSource</a> projects, <a class=' tw-tiddlylink tw-tiddlylink-resolves' href='http://five.tiddlywiki.com/static/TiddlyWiki5.html'>TiddlyWiki5</a> needs a signed contributor license agreement from individual contributors before contributions of code can be accepted. This is a legal agreement that allows contributors to assert that they own the copyright of their contribution, and that they agree to license it to the <a class=' tw-tiddlylink tw-tiddlylink-missing' href='http://five.tiddlywiki.com/static/UnaMesa.html'>UnaMesa</a> Association (the legal entity that owns <a class=' tw-tiddlylink tw-tiddlylink-resolves' href='http://five.tiddlywiki.com/static/TiddlyWiki.html'>TiddlyWiki</a> on behalf of the community).</p><ul><li>For individuals use: <a class='tw-tiddlylink-external' href='https://github.com/Jermolene/TiddlyWiki5/tree/master/licenses/cla-individual.md' target='_blank'>CLA-individual</a></li><li>For entities use: <a class='tw-tiddlylink-external' href='https://github.com/Jermolene/TiddlyWiki5/tree/master/licenses/cla-entity.md' target='_blank'>CLA-entity</a></li></ul><p><em>This is a first pass at a CLA for <a class=' tw-tiddlylink tw-tiddlylink-resolves' href='http://five.tiddlywiki.com/static/TiddlyWiki.html'>TiddlyWiki</a>. Please let us know if we missed something important. If we do have to make essential changes to the CLA, there is a possibility that all contributors will need to sign it again</em></p><h3 class=''>How to sign the CLA</h3><pre>git clone https://github.com/Jermolene/TiddlyWiki5.git TiddlyWiki5
<h1 class=''>Contributing to <a class=' tw-tiddlylink tw-tiddlylink-resolves' href='http://five.tiddlywiki.com/static/TiddlyWiki5.html'>TiddlyWiki5</a></h1><p><a class=' tw-tiddlylink tw-tiddlylink-resolves' href='http://five.tiddlywiki.com/static/TiddlyWiki5.html'>TiddlyWiki5</a> welcomes contributions to its code and documentation via <a class='tw-tiddlylink-external' href='https://github.com/Jermolene/TiddlyWiki5' target='_blank'>GitHub</a>. Please take a moment to read these notes to help make the process as smooth as possible.</p><h2 class=''>Bug Reports</h2><p>From the perspective of the developers, a bug report that says little more than &quot;it doesn't work&quot; can be frustrating. For effective debugging, we need as much information as possible. At a minimum, please try to include:</p><ul><li>A descriptive title</li><li>A summary</li><li>Steps to reproduce</li><li>Expected behaviour</li><li>Context (OS, browser etc.)</li></ul><p>There's a lot of good material on the web about bug reports:</p><ul><li><a class='tw-tiddlylink-external' href='http://mhay68.tumblr.com/post/1648223018/what-makes-a-good-bug-report' target='_blank'>http://mhay68.tumblr.com/post/1648223018/what-makes-a-good-bug-report</a></li><li><a class='tw-tiddlylink-external' href='http://www.chiark.greenend.org.uk/~sgtatham/bugs.html' target='_blank'>http://www.chiark.greenend.org.uk/~sgtatham/bugs.html</a></li></ul><h2 class=''>Pull Requests</h2><p>Like other <a class=' tw-tiddlylink tw-tiddlylink-resolves' href='http://five.tiddlywiki.com/static/OpenSource.html'>OpenSource</a> projects, <a class=' tw-tiddlylink tw-tiddlylink-resolves' href='http://five.tiddlywiki.com/static/TiddlyWiki5.html'>TiddlyWiki5</a> needs a signed contributor license agreement from individual contributors before contributions of code can be accepted. This is a legal agreement that allows contributors to assert that they own the copyright of their contribution, and that they agree to license it to the <a class=' tw-tiddlylink tw-tiddlylink-missing' href='http://five.tiddlywiki.com/static/UnaMesa.html'>UnaMesa</a> Association (the legal entity that owns <a class=' tw-tiddlylink tw-tiddlylink-resolves' href='http://five.tiddlywiki.com/static/TiddlyWiki.html'>TiddlyWiki</a> on behalf of the community).</p><ul><li>For individuals use: <a class='tw-tiddlylink-external' href='https://github.com/Jermolene/TiddlyWiki5/tree/master/licenses/cla-individual.md' target='_blank'>licenses/CLA-individual</a></li><li>For entities use: <a class='tw-tiddlylink-external' href='https://github.com/Jermolene/TiddlyWiki5/tree/master/licenses/cla-entity.md' target='_blank'>licenses/CLA-entity</a></li></ul><p><em>This is a first pass at a CLA for <a class=' tw-tiddlylink tw-tiddlylink-resolves' href='http://five.tiddlywiki.com/static/TiddlyWiki.html'>TiddlyWiki</a>. Please let us know if we missed something important. If we do have to make essential changes to the CLA, there is a possibility that all contributors will need to sign it again</em></p><h3 class=''>How to sign the CLA</h3><pre>git clone https://github.com/Jermolene/TiddlyWiki5.git TiddlyWiki5
cd TiddlyWiki5
git checkout -b sign-cla</pre><p><strong>Add your name and the date to cla-individual.md or cla-entity.md</strong>. Date format (YYYY/MM/DD)
eg: <code>Jeremy Ruston, @Jermolene, 2011/11/22</code></p><pre>git add .

View File

@@ -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,

View File

@@ -96,7 +96,15 @@ exports["text/html"] = function(text,fields) {
match = storeAreaMarkerRegExp.exec(text);
if(match) {
// If so, it's either a classic TiddlyWiki file or a TW5 file
return deserializeTiddlyWikiFile(text,storeAreaMarkerRegExp.lastIndex,!!match[1],fields);
// First read the normal tiddlers
var results = deserializeTiddlyWikiFile(text,storeAreaMarkerRegExp.lastIndex,!!match[1],fields);
// Then any system tiddlers
var systemAreaMarkerRegExp = /<div id=["']?systemArea['"]?( style=["']?display:none;["']?)?>/gi,
sysMatch = systemAreaMarkerRegExp.exec(text);
if(sysMatch) {
results.push.apply(results,deserializeTiddlyWikiFile(text,systemAreaMarkerRegExp.lastIndex,!!sysMatch[1],fields));
}
return results
} else {
// It's not a TiddlyWiki so we'll return the entire HTML file as a tiddler
return deserializeHtmlFile(text,fields);

View 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;
};
})();

View File

@@ -52,14 +52,15 @@ exports.types = {block: true};
exports.init = function(parser) {
this.parser = parser;
// Regexp to match
this.matchRegExp = /([\*#;:]+)/mg;
this.matchRegExp = /([\*#;:>]+)/mg;
};
var listTypes = {
"*": {listTag: "ul", itemTag: "li"},
"#": {listTag: "ol", itemTag: "li"},
";": {listTag: "dl", itemTag: "dt"},
":": {listTag: "dl", itemTag: "dd"}
":": {listTag: "dl", itemTag: "dd"},
">": {listTag: "blockquote", itemTag: "p"}
};
/*
@@ -71,7 +72,7 @@ exports.parse = function() {
// Cycle through the items in the list
while(true) {
// Match the list marker
var reMatch = /([\*#;:]+)/mg;
var reMatch = /([\*#;:>]+)/mg;
reMatch.lastIndex = this.parser.pos;
var match = reMatch.exec(this.parser.source);
if(!match || match.index !== this.parser.pos) {

View File

@@ -0,0 +1,93 @@
/*\
title: $:/core/modules/parsers/wikiparser/rules/quoteblock.js
type: application/javascript
module-type: wikirule
Wiki text rule for quote blocks. For example:
```
<<<.optionalClass(es) optional cited from
a quote
<<<
<<<.optionalClass(es)
a quote
<<< optional cited from
```
Quotes can be quoted by putting more <s
```
<<<
Quote Level 1
<<<<
QuoteLevel 2
<<<<
<<<
```
\*/
(function(){
/*jslint node: true, browser: true */
/*global $tw: false */
"use strict";
exports.name = "quoteblock";
exports.types = {block: true};
exports.init = function(parser) {
this.parser = parser;
// Regexp to match
this.matchRegExp = /(<<<+)/mg;
};
exports.parse = function() {
var classes = ["tw-quote"];
// Get all the details of the match
var reEndString = "^" + this.match[1] + "(?!<)";
// Move past the <s
this.parser.pos = this.matchRegExp.lastIndex;
// Parse any classes, whitespace and then the optional cite itself
classes.push.apply(classes, this.parser.parseClasses());
this.parser.skipWhitespace({treatNewlinesAsNonWhitespace: true});
var cite = this.parser.parseInlineRun(/(\r?\n)/mg);
// before handling the cite, parse the body of the quote
var tree= this.parser.parseBlocks(reEndString);
// If we got a cite, put it before the text
if ( cite.length > 0 ) {
tree.unshift({
type: "element",
tag: "cite",
children: cite
});
}
// Parse any optional cite
this.parser.skipWhitespace({treatNewlinesAsNonWhitespace: true});
var cite = this.parser.parseInlineRun(/(\r?\n)/mg);
// If we got a cite, push it
if ( cite.length > 0 ) {
tree.push({
type: "element",
tag: "cite",
children: cite
});
}
// Return the blockquote element
return [{
type: "element",
tag: "blockquote",
attributes: {
class: { type: "string", value: classes.join(" ") },
},
children: tree
}];
};
})();

View 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);
};
})();

View 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);
};
})();

View File

@@ -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:}
@@ -385,6 +383,9 @@ Syncer.prototype.processTaskQueue = function() {
this.taskInProgress[task.title] = task;
// Dispatch the task
this.dispatchTask(task,function(err) {
if(err) {
console.log("Sync error while processing '" + task.title + "':\n" + err);
}
// Mark that this task is no longer in progress
delete self.taskInProgress[task.title];
// Process the next task
@@ -436,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);
@@ -457,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);
});

View File

@@ -13,7 +13,10 @@ Manages themes and styling.
"use strict";
var THEME_PLUGIN_TITLE = "$:/theme", // This tiddler contains the title of the current theme plugin
DEFAULT_THEME_PLUGIN = "$:/themes/tiddlywiki/vanilla";
DEFAULT_THEME_PLUGINS = [
"$:/themes/tiddlywiki/snowwhite",
"$:/themes/tiddlywiki/vanilla"
];
function ThemeManager(wiki) {
this.wiki = wiki;
@@ -32,7 +35,12 @@ function ThemeManager(wiki) {
ThemeManager.prototype.switchTheme = function() {
// Get the name of the current theme
var themePluginTitle = this.wiki.getTiddlerText(THEME_PLUGIN_TITLE,DEFAULT_THEME_PLUGIN);
var themePluginTitle = this.wiki.getTiddlerText(THEME_PLUGIN_TITLE);
// If it doesn't exist, then fallback to one of the default themes
var index = 0;
while(!this.wiki.getTiddler(themePluginTitle) && index < DEFAULT_THEME_PLUGINS.length) {
themePluginTitle = DEFAULT_THEME_PLUGINS[index++];
}
// Accumulate the titles of the plugins that we need to load
var themePlugins = [],
self = this,
@@ -40,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);
});
}

View File

@@ -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") {

View File

@@ -68,7 +68,7 @@ EditWidget.prototype.execute = function() {
this.makeChildWidgets([{
type: "edit-" + editorType,
attributes: {
title: {type: "string", value: this.editTitle},
tiddler: {type: "string", value: this.editTitle},
field: {type: "string", value: this.editField},
index: {type: "string", value: this.editIndex},
"class": {type: "string", value: this.editClass}

View File

@@ -70,131 +70,154 @@ 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 draftTiddler = this.getDraftTiddler(event.tiddlerTitle),
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] === event.tiddlerTitle) {
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();
var title = event.param || event.tiddlerTitle,
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;
};
// Delete a tiddler
NavigatorWidget.prototype.handleDeleteTiddlerEvent = function(event) {
// Get the tiddler we're deleting
var tiddler = this.wiki.getTiddler(event.tiddlerTitle);
var title = event.param || event.tiddlerTitle,
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(event.tiddlerTitle);
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(event.tiddlerTitle,-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);
}
@@ -234,71 +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 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] === event.tiddlerTitle) {
var tiddler = this.wiki.getTiddler(event.tiddlerTitle);
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(event.tiddlerTitle);
// 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;
}
}
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
// 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;
for(var t=0; t<this.storyList.length; t++) {
if(this.storyList[t] === event.tiddlerTitle) {
var tiddler = this.wiki.getTiddler(event.tiddlerTitle);
if(tiddler && tiddler.hasField("draft.title")) {
// Remove the draft tiddler
this.wiki.deleteTiddler(event.tiddlerTitle);
// Make the story record point to the original tiddler
this.storyList[t] = tiddler.fields["draft.title"];
// Check if we're modifying the story tiddler itself
if(tiddler.fields["draft.title"] === this.storyTitle) {
storyTiddlerModified = true;
}
}
}
}
if(!storyTiddlerModified) {
this.saveStoryList();
// Flip the specified tiddler from draft back to the original
var draftTitle = event.param || event.tiddlerTitle,
draftTiddler = this.wiki.getTiddler(draftTitle),
originalTitle = draftTiddler.fields["draft.of"],
storyList = this.getStoryList();
if(draftTiddler && originalTitle) {
// Remove the draft tiddler
this.wiki.deleteTiddler(draftTitle);
this.replaceFirstTitleInStory(storyList,draftTitle,originalTitle);
this.addToHistory(originalTitle,event.navigateFromClientRect);
this.saveStoryList(storyList);
}
return false;
};
@@ -306,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;
}
@@ -334,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;
};
@@ -349,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 {
@@ -359,25 +367,25 @@ NavigatorWidget.prototype.handleImportTiddlersEvent = function(event) {
}
// Process each tiddler
$tw.utils.each(tiddlers,function(tiddlerFields) {
// Generate a unique title for the tiddler
var title = self.wiki.generateNewTitle(tiddlerFields.title);
var title = tiddlerFields.title;
// Add it to the store
self.wiki.addTiddler(new $tw.Tiddler(
var imported = self.wiki.importTiddler(new $tw.Tiddler(
self.wiki.getCreationFields(),
self.wiki.getModificationFields(),
tiddlerFields,
{title: title}
tiddlerFields
));
// Add it to the story
if(self.storyList.indexOf(title) === -1) {
self.storyList.unshift(title);
if(imported) {
// Add it to the story
if(storyList.indexOf(title) === -1) {
storyList.unshift(title);
}
// And to history
history.push(title);
}
// And to history
history.push({title: title});
});
// Save the updated story and history
this.saveStoryList();
this.wiki.setTiddlerData(this.historyTitle,history);
this.saveStoryList(storyList);
this.addToHistory(history);
return false;
};

View 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;
})();

View File

@@ -148,8 +148,9 @@ ViewWidget.prototype.getValueAsDoubleUrlEncoded = function() {
};
ViewWidget.prototype.getValueAsDate = function(format) {
var value = this.getValue();
if(value) {
format = format || "YYYY MM DD 0hh:0ss";
var value = $tw.utils.parseDate(this.getValue());
if(value && $tw.utils.isDate(value) && value.toString() !== "Invalid Date") {
return $tw.utils.formatDateString(value,format);
} else {
return "";

View File

@@ -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 {

View File

@@ -210,6 +210,23 @@ exports.addTiddler = function(tiddler) {
this.enqueueTiddlerEvent(title);
};
/*
Like addTiddler() except it will silently reject any plugin tiddlers that are older than the currently loaded version. Returns true if the tiddler was imported
*/
exports.importTiddler = function(tiddler) {
var existingTiddler = this.getTiddler(tiddler.fields.title);
// Check if we're dealing with a plugin
if(tiddler && tiddler.hasField("plugin-type") && tiddler.hasField("version") && existingTiddler && existingTiddler.hasField("plugin-type") && existingTiddler.hasField("version")) {
// Reject the incoming plugin if it is older
if($tw.utils.checkVersions(existingTiddler.fields.version,tiddler.fields.version)) {
return false;
}
}
// Fall through to adding the tiddler
this.addTiddler(tiddler);
return true;
};
/*
Return a hashmap of the fields that should be set when a tiddler is created
*/
@@ -238,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) {
@@ -268,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);
};
@@ -306,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]];
@@ -740,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);

View 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 -->&#13;&#10;

View File

@@ -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" />

View File

@@ -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]]"/>'' |

View File

@@ -2,6 +2,6 @@ title: $:/core/ui/ControlPanel/Plugins
tags: $:/tags/ControlPanel
caption: Plugins
<table><tbody><tr><th>Title</th><th>Description</th></tr><$list filter="[!has[draft.of]has[plugin-type]sort[title]]"><tr><td><$link to={{!!title}}><$view field="title"/></$link></td><td><$view field="description"/></td></tr></$list>
<table><tbody><tr><th>Title</th><th>Description</th><th>Version</th></tr><$list filter="[!has[draft.of]has[plugin-type]sort[title]]"><tr><td><$link to={{!!title}}><$view field="title"/></$link></td><td><$view field="description"/></td><td><$view field="version"/></td></tr></$list>
</tbody>
</table>

View File

@@ -1,5 +1,4 @@
title: $:/core/ui/EditTemplate
modifier: JeremyRuston
\define frame-classes()
tw-tiddler-frame tw-tiddler-edit-frame $(missingTiddlerClass)$ $(shadowTiddlerClass)$ $(systemTiddlerClass)$

View File

@@ -13,5 +13,21 @@ title: $:/core/ui/PageMacros
</$reveal>
</$list>
</div>
\end
\define wikitext-example(src)
```
$src$
```
Renders as:
$src$
In HTML:
$$$text/vnd.tiddlywiki>text/html
$src$
$$$
\end
{{$:/core/ui/PageTemplate}}

View File

@@ -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]]" 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}}

View File

@@ -6,7 +6,7 @@ caption: Tools
---
{{$:/snippets/themeswitcher}}
{{$:/snippets/minithemeswitcher}}
---

View File

@@ -1,5 +1,4 @@
title: $:/core/ui/ViewTemplate
modifier: JeremyRuston
\define frame-classes()
tw-tiddler-frame $(missingTiddlerClass)$ $(shadowTiddlerClass)$ $(systemTiddlerClass)$

View File

@@ -0,0 +1,8 @@
title: $:/snippets/minithemeswitcher
Current theme: <$link to={{$:/theme}}><$view tiddler={{$:/theme}} field="name"/></$link>
<$linkcatcher to="$:/theme">
<$list filter="[plugin-type[theme]sort[title]]"><div><$reveal state="$:/theme" type="match" text={{!!title}}>&bull;</$reveal><$reveal state="$:/theme" type="nomatch" text={{!!title}}>&nbsp;</$reveal> <$link to={{!!title}}><$view field="name" format="text"/></$link></div>
</$list>
</$linkcatcher>

View File

@@ -1,8 +1,8 @@
title: $:/snippets/themeswitcher
Current theme: {{$:/theme}}
Current theme: <$link to={{$:/theme}}><$view tiddler={{$:/theme}} field="name"/></$link>
<$linkcatcher to="$:/theme">
<$list filter="[plugin-type[theme]sort[title]]"><div><$reveal state="$:/theme" type="match" text={{!!title}}>&bull;</$reveal><$reveal state="$:/theme" type="nomatch" text={{!!title}}>&nbsp;</$reveal> <$link to={{!!title}}><$view field="name" format="text"/></$link></div>
<$list filter="[plugin-type[theme]sort[title]]"><div><$reveal state="$:/theme" type="match" text={{!!title}}>&bull;</$reveal><$reveal state="$:/theme" type="nomatch" text={{!!title}}>&nbsp;</$reveal> <$link to={{!!title}}>''<$view field="name" format="text"/>'' <$view field="description" format="text"/></$link></div>
</$list>
</$linkcatcher>
</$linkcatcher>

View File

@@ -0,0 +1,2 @@
title: $:/GoogleAnalyticsAccount

View File

@@ -0,0 +1,2 @@
title: $:/GoogleAnalyticsDomain

View File

@@ -1,4 +1,3 @@
title: SiteSubtitle
modifier: JeremyRuston
Tahoe-LAFS edition

View File

@@ -1,4 +1,3 @@
title: SiteTitle
modifier: JeremyRuston
TiddlyWiki5

View File

@@ -1,4 +1,3 @@
title: SiteSubtitle
modifier: JeremyRuston
browser-based test runner

View File

@@ -1,4 +1,3 @@
title: SiteTitle
modifier: JeremyRuston
TiddlyWiki5

View File

@@ -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' } ] } ]
);
});
});
})();

View File

@@ -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.

View File

@@ -1,7 +1,5 @@
created: 20130909151600000
creator: JeremyRuston
modified: 20131128103349581
modifier: JeremyRuston
modified: 20131211130139832
tags: community
title: Community
type: text/vnd.tiddlywiki
@@ -21,7 +19,7 @@ The TiddlyWiki discussion groups are mailing lists for talking about TiddlyWiki:
! Resources for TiddlyWiki5
* [[TW5 Mall|http://www.giffmex.org/tw5mall.htm]] -- DaveGifford's growing catalogue of hints and tips
* A [[guide to creating a fixed top menu|https://dl.dropboxusercontent.com/u/2638511/TW5_Test.htm]] from TonGerner
* A [[guide to creating a top menu and toolbars|http://tw5toolbar.tiddlyspot.com/]] from TonGerner
* A [[TW5Magick|http://tw5magick.tiddlyspot.com/]] -- a collection of hints and tips from StephanHradek
* A new theme from [[BobRobison|http://tw5gray.tiddlyspot.com]]
* [[Bestrew|http://nocategories.net/tiddlywiki/bestrew.html]] -- DylanKinnett's adaptation of TiddlyWiki5 as a writers manuscript submission tracker
@@ -34,5 +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://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

View File

@@ -1,7 +1,5 @@
created: 201311011114
creator: JeremyRuston
modified: 201311011114
modifier: JeremyRuston
modified: 201311301614
tags: introduction
title: Contributing
@@ -26,8 +24,8 @@ There's a lot of good material on the web about bug reports:
Like other OpenSource projects, TiddlyWiki5 needs a signed contributor license agreement from individual contributors before contributions of code can be accepted. This is a legal agreement that allows contributors to assert that they own the copyright of their contribution, and that they agree to license it to the UnaMesa Association (the legal entity that owns TiddlyWiki on behalf of the community).
* For individuals use: [[CLA-individual|https://github.com/Jermolene/TiddlyWiki5/tree/master/licenses/cla-individual.md]]
* For entities use: [[CLA-entity|https://github.com/Jermolene/TiddlyWiki5/tree/master/licenses/cla-entity.md]]
* For individuals use: [[licenses/CLA-individual|https://github.com/Jermolene/TiddlyWiki5/tree/master/licenses/cla-individual.md]]
* For entities use: [[licenses/CLA-entity|https://github.com/Jermolene/TiddlyWiki5/tree/master/licenses/cla-entity.md]]
//This is a first pass at a CLA for TiddlyWiki. Please let us know if we missed something important. If we do have to make essential changes to the CLA, there is a possibility that all contributors will need to sign it again//

View File

@@ -1,65 +1,39 @@
created: 201308241418
creator: JeremyRuston
modified: 201308251303
modifier: JeremyRuston
created: 20130824141800000
modified: 20131212093542990
tags: introduction
title: Docs
type: text/vnd.tiddlywiki
This is the main documentation hub for TiddlyWiki. See also the DeveloperDocs.
\define bulletList(tag)
{{$tag$}}
! Editions
TiddlyWiki5 can be used via these editions:
<$list filter="[tag[edition]sort[title]]" type="ul"/>
<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 [[TiddlyWiki for Developers]].
! How to use ~TiddlyWiki5
<$list filter="[tag[howto]sort[title]]" type="ul"/>
<<bulletList "howto">>
! Concepts
The core concepts underlying TiddlyWiki are:
* [[Tiddlers]]
* [[Wiki]]
* TiddlyWiki
* WikiText
The machinery tying those concepts together includes:
* TiddlerFilters
* TiddlerFields
* TiddlerTemplates
* DataTiddlers
* ContentType
* SystemTiddlers
* [[Plugins]]
* [[Modules]] and [[ModuleType]]
<<bulletList "concepts">>
! Wiki Text Rules
These are the individual rules that make up WikiText:
<$list filter="[tag[wikitextrule]sort[title]]" type="ul"/>
<<bulletList "wikitext">>
! Widgets
Widgets give WikiText dynamic functionality:
<$list filter="[tag[widget]sort[title]]" type="ul"/>
<<bulletList "widget">>
! Commands
{{command}}
<$list filter="[tag[command]sort[title]]" type="ul"/>
<<bulletList "command">>
! Tips
{{tips}}
<$list filter="[tag[tips]sort[title]]" type="ul"/>
<<bulletList "tips">>
! Miscellaneous

View File

@@ -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]].

View File

@@ -1,7 +1,5 @@
created: 201309091551
creator: JeremyRuston
modified: 201309091551
modifier: JeremyRuston
title: Examples
Examples of TiddlyWiki5 being used in the wild:

View File

@@ -1,12 +1,10 @@
created: 20130822172800000
creator: JeremyRuston
modified: 20131129163630584
modifier: JeremyRuston
modified: 20131213100612914
tags: introduction
title: Features
type: text/vnd.tiddlywiki
* The ability to save changes on almost any desktop HTML5 compatible-browser, with custom apps to enable [[Saving on iPad/iPhone]] and [[Android|How to use TiddlyWiki5 as a standalone HTML file with AndTidWiki]], and a cross-platform [[Firefox extension|Saving with TiddlyFox]] that even runs on Android
* The ability to save changes on almost any desktop HTML5 compatible-browser, with custom apps to enable [[Saving on iPad/iPhone]] and [[Android|Saving on Android]], and a cross-platform [[Firefox extension|Saving with TiddlyFox]] that even runs on Android
* [[Bitmap images|Motovun Jack.jpg]] and [[SVG images|UsingSVG]] are first-class citizens alongside text
* Concise and expressive WikiText that generates semantic HTML
* Integrated [[AES encryption|Saving with Encryption]]
@@ -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).

View 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.

View File

@@ -1,11 +1,12 @@
created: 20131129090249275
creator: JeremyRuston
modified: 20131129171927975
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.
! The 'works anywhere' method
@@ -19,8 +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]]
* [[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

View File

@@ -1,20 +1,21 @@
created: 20130822170200000
creator: JeremyRuston
modified: 20131130073307697
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.
//TiddlyWiki is a free, open source project that depends on [[your love and support|HelpingTiddlyWiki]] for its 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>
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.
The original TiddlyWiki Classic is still available at http://tiddlywiki.com/.
!! TiddlyWikiClassic - http://classic.tiddlywiki.com
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>

View File

@@ -1,7 +1,5 @@
created: 20130825160500000
creator: JeremyRuston
modified: 20131126195146799
modifier: JeremyRuston
modified: 20131206172505397
tags: community
title: HelpingTiddlyWiki
type: text/vnd.tiddlywiki
@@ -17,6 +15,14 @@ OpenSource projects like TiddlyWiki thrive on the feedback and engagement of use
! Help improve the documentation and code
There are many ways you can contribute to TiddlyWiki:
* Writing tutorials
* Contributing to the documentation on tiddlywiki.com
* Making video screencasts
* Curating relevant links, hints and tips on a wiki
The main TiddlyWiki documentation and code lives on GitHub, and welcomes [[contributions|Contributing]]:
* https://github.com/Jermolene/TiddlyWiki5

View File

@@ -1,7 +1,5 @@
created: 20131128075743966
creator: JeremyRuston
modified: 20131128093317966
modifier: JeremyRuston
tags: introduction
title: Philosophy of Tiddlers
type: text/vnd.tiddlywiki

View File

@@ -1,9 +1,8 @@
created: 201311081754007
creator: JeremyRuston
modified: 201311081754007
modifier: JeremyRuston
title: Release 5.0.0-alpha.11
tags: releasenote
released: 201311081806
This release is the culmination of a large scale refactoring of the widget mechanism of TiddlyWiki5. There are several changes to be aware of if upgrading from earlier versions:

View File

@@ -1,10 +1,8 @@
created: 201311081854007
creator: JeremyRuston
modified: 201311081854007
modifier: JeremyRuston
title: Release 5.0.0-alpha.12
tags: releasenote
released: 201311082141
//[[See GitHub for detailed change history of this release|https://github.com/Jermolene/TiddlyWiki5/compare/v5.0.0-alpha.11...v5.0.0-alpha.12]]//

View File

@@ -1,9 +1,8 @@
created: 201311091122007
creator: JeremyRuston
modified: 201311091122007
modifier: JeremyRuston
title: Release 5.0.0-alpha.13
tags: releasenote
released: 201311091927
//[[See GitHub for detailed change history of this release|https://github.com/Jermolene/TiddlyWiki5/compare/v5.0.0-alpha.12...v5.0.0-alpha.13]]//

View File

@@ -1,9 +1,8 @@
created: 201311101922007
creator: JeremyRuston
modified: 201311101922007
modifier: JeremyRuston
title: Release 5.0.0-alpha.14
tags: releasenote
released: 201311102315
//[[See GitHub for detailed change history of this release|https://github.com/Jermolene/TiddlyWiki5/compare/v5.0.0-alpha.13...v5.0.0-alpha.14]]//

View File

@@ -1,9 +1,8 @@
created: 201311122050007
creator: JeremyRuston
modified: 201311122050007
modifier: JeremyRuston
title: Release 5.0.0-alpha.15
tags: releasenote
released: 201311191221
//[[See GitHub for detailed change history of this release|https://github.com/Jermolene/TiddlyWiki5/compare/v5.0.0-alpha.14...v5.0.0-alpha.15]]//

View File

@@ -1,10 +1,9 @@
created: 20131119125600007
creator: JeremyRuston
modified: 20131130095531749
modifier: JeremyRuston
tags: releasenote
title: Release 5.0.0-alpha.16
type: text/vnd.tiddlywiki
released: 201311301325
//[[See GitHub for detailed change history of this release|https://github.com/Jermolene/TiddlyWiki5/compare/v5.0.0-alpha.15...v5.0.0-alpha.16]]//

View File

@@ -1,10 +1,9 @@
created: 20131130151600007
creator: JeremyRuston
modified: 20131130151631749
modifier: JeremyRuston
tags: releasenote
title: Release 5.0.0-alpha.17
type: text/vnd.tiddlywiki
released: 201311301519
//[[See GitHub for detailed change history of this release|https://github.com/Jermolene/TiddlyWiki5/compare/v5.0.0-alpha.16...v5.0.0-alpha.17]]//

View File

@@ -0,0 +1,26 @@
created: 20131201132300007
modified: 20131206161343895
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]]//
!! Improvements
* Changes to the importing process to enable a smoother [[Upgrading]] process
** Ignores attempts to import plugins that are older than currently installed plugins
** System tiddlers are now imported as usual
* If `$:/theme` isn't defined or refers to a missing tiddler, then fallback through ''Snow White'' to ''Vanilla''. This means that `empty.html` now defaults to ''Snow White''
* Added support for [[Block Quotes in WikiText]]
** Contributed by StephanHradek (@Skeeve on GitHub)
!! Bug fixes
* Fixed bug that was preventing `$:/tags/PageControls` tiddlers from being reordered
!! Internal changes
* Changed the [[TiddlyWiki5 Versioning]] policy
** New alpha releases will be `5.0.x-alpha`, beta releases will be `5.1.x-beta` and the final release will be `5.2.x`

View 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)

View File

@@ -1,14 +1,14 @@
created: 201311091054007
creator: JeremyRuston
modified: 201311091054007
modifier: JeremyRuston
created: 20131109105400007
modified: 20131203093653197
title: ReleaseHistory
type: text/vnd.tiddlywiki
Here are the details of recent releases of TiddlyWiki5.
Here are the details of recent releases of TiddlyWiki5. See [[TiddlyWiki5 Versioning]] for details of how releases are named.
<$list filter="[tag[releasenote]!sort[created]]">
<div>
<h1><$link to={{!!title}}><$view field="title"/></$link></h1>
<div>''Release date: <$view field="released" format="date" template="DDth MMM YYYY at 0hh:0mm">TBA</$view>''</div>
<div>
<$transclude/>
</div>

View File

@@ -1,7 +1,5 @@
created: 201308221734
creator: JeremyRuston
modified: 201308221734
modifier: JeremyRuston
tags: features
title: Scalability

View File

@@ -1,7 +1,5 @@
created: 20131128090536894
creator: JeremyRuston
modified: 20131128093425922
modifier: JeremyRuston
tags: introduction
title: Structuring TiddlyWiki
type: text/vnd.tiddlywiki

View File

@@ -1,7 +1,5 @@
created: 201308230917000
creator: JeremyRuston
modified: 201311091500004
modifier: JeremyRuston
tags: community
title: TiddlyWiki Hangouts
type: text/vnd.tiddlywiki

View File

@@ -0,0 +1,34 @@
created: 20131202102427114
modified: 20131212094500689
tags: howto
title: Upgrading
type: text/vnd.tiddlywiki
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 TiddlyWiki HTML file into the browser window
#* Your tiddlers should be imported
# 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://
># Open the control panel to the ''Plugins'' tab in your upgraded wiki
># Check the version numbers of the plugins you are using; any plugins with an older version than the version of [[$:/core]] will probably need updating
># Locate a wiki with the plugins you need to update and open the control panel ''Plugins'' tab
>#* http://five.tiddlywiki.com/d3demo.html for the D3 plugin
>#* http://five.tiddlywiki.com/codemirrordemo.html for the CodeMirror plugin
>#* http://five.tiddlywiki.com/markdowndemo.html for the MarkDown plugin
>#* http://five.tiddlywiki.com/ for most of the others
># Drag the plugin links one by one back to your own wiki. You should see the version numbers update in the control panel
># Save your wiki
! Offline upgrading
You can also download http://five.tiddlywiki.com/empty.html locally and perform the same drag-and-drop procedure to upgrade your files.

View File

@@ -1,7 +1,5 @@
created: 201308251449
creator: JeremyRuston
modified: 201308251449
modifier: JeremyRuston
tags: concepts
title: ContextTiddler

View File

@@ -1,7 +1,5 @@
created: 201308291647
creator: JeremyRuston
modified: 201308291647
modifier: JeremyRuston
tags: concepts
title: DataTiddlers

View File

@@ -1,7 +1,5 @@
created: 20131129162847412
creator: JeremyRuston
modified: 20131129162908445
modifier: JeremyRuston
tags: concepts
title: ModuleType
type: text/vnd.tiddlywiki

View File

@@ -1,7 +1,5 @@
created: 20131129162919588
creator: JeremyRuston
modified: 20131129162935396
modifier: JeremyRuston
tags: concepts
title: Modules
type: text/vnd.tiddlywiki

View File

@@ -1,7 +1,5 @@
created: 20130822080600000
creator: JeremyRuston
modified: 20131129163429930
modifier: JeremyRuston
tags: concepts
title: SystemTags
type: text/vnd.tiddlywiki

View File

@@ -1,7 +1,5 @@
created: 201308270759
creator: JeremyRuston
modified: 201311011115
modifier: JeremyRuston
tags: concepts
title: TextReference

View File

@@ -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}} |

View File

@@ -1,7 +1,5 @@
created: 201308270800
creator: JeremyRuston
modified: 201311242006
modifier: JeremyRuston
tags: concepts
title: TiddlerFilters

View File

@@ -1,7 +1,5 @@
created: 20130825202900000
creator: JeremyRuston
modified: 20131128093306317
modifier: JeremyRuston
tags: concepts
title: TiddlerLinks
type: text/vnd.tiddlywiki

View File

@@ -1,7 +1,5 @@
created: 201308252135
creator: JeremyRuston
modified: 201308300907
modifier: JeremyRuston
tags: concepts
title: Tiddlers

View File

@@ -1,7 +1,5 @@
created: 20130822170700000
creator: JeremyRuston
modified: 20131129163834730
modifier: JeremyRuston
tags: concepts
title: TiddlyWiki
type: text/vnd.tiddlywiki

View File

@@ -1,7 +1,5 @@
created: 201308252136
creator: JeremyRuston
modified: 201308252136
modifier: JeremyRuston
tags: concepts
title: TiddlyWiki5

View File

@@ -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

View File

@@ -1,287 +1,9 @@
created: 20131205155227468
modified: 20131205161350589
tags: concepts
type: text/vnd.tiddlywiki
title: WikiText
modified: 201310291329
\define wikitext-example(src)
```
$src$
```
Renders as:
$src$
In HTML:
$$$text/vnd.tiddlywiki>text/html
$src$
$$$
\end
type: text/vnd.tiddlywiki
WikiText is a concise, expressive way of typing a wide range of text formatting, hypertext and interactive features. It allows you to focus on writing without a complex user interface getting in the way. It is designed to be familiar for users of [[MarkDown|http://daringfireball.net/projects/markdown/]], but with more of a focus on linking and the interactive features.
! Linking in WikiText
A key capability of WikiText is the ability to make links to other tiddlers or to external websites. There are several ways of doing this:
* To link to a tiddler by title: `[[Tiddler Title]]`
* To link to a tiddler and specify the text of the link: `[[Displayed Link Title|Tiddler Title]]`
* For tiddler titles that match the CamelCase rules, just typing the title will automatically create a link
* To link to an external website, type the full URL of the site: `http://five.tiddlywiki.com/`
You can suppress a link from being recognised by preceding it with `~`. For example:
<<wikitext-example src:"* ~HelloThere is not a link
* ~http://google.com/ is not a link">>
! Paragraphs
To mark the end of a paragraph in TiddlyWiki you need to type `enter` twice to create a double line break:
```
This is the first paragraph.
And this is the second paragraph.
```
Single line breaks are ignored within paragraphs. For example:
<<wikitext-example src:"This is a
paragraph made
up of
short lines">>
! Formatting
Available character formatting includes:
* <code>&#96;backticks&#96;</code> for `code`
* `''bold''` for ''bold text''
* `//italic//` for //italic text//
* `__underscore__` for __underscored text__
* `^^superscript^^` for ^^superscript^^ text
* `,,subscript,,` for ,,subscripted,, text
* `~~strikethrough~~` for ~~strikethrough~~ text
You can also use triple backticks <code>&#96;&#96;&#96;</code> to mark code blocks:
<pre>
&#96;&#96;&#96;
This will be monospaced
&#96;&#96;&#96;
</pre>
The three backticks need to be at the start of the line and immediately followed by a newline, otherwise they won't be interpreted correctly.
Renders as:
```
This will be monospaced
```
! Transclusion
You can incorporate the content of one tiddler within another using the transclusion notation:
* `{{MyTiddler}}` transcludes a single tiddler
* `{{MyTiddler||TemplateTitle}}` displays the tiddler through a specified [[TiddlerTemplate|TiddlerTemplates]]
A similar syntax can be used to transclude a list of tiddlers matching a specified [[TiddlerFilter|TiddlerFilters]]:
```
{{{ [tag[mechanism]] }}}
{{{ [tag[mechanism]] ||TemplateTitle}}}
```
! Images
To display an image stored in a tiddler just transclude that tiddler:
```
{{Motovun Jack.jpg}}
```
Renders as:
{{Motovun Jack.jpg}}
! Lists
You can create unordered lists with `*` characters:
<<wikitext-example src:"* First list item
* Second list item
** A subitem
* Third list item
">>
Ordered lists use `#` instead of `*`:
# First item
# Second item
# Third item
You can also mix ordered and unordered list items:
<<wikitext-example src:"* To do today
*# Eat
* To get someone else to do
*# This
*# That
*## And the other
">>
You can also create HTML definition lists:
<<wikitext-example src:"; Term being defined
: Definition of that term
; Another term
: Another definition
">>
! Adding styles and classes
You can use this construction to cause the wrapped content to be assigned specified CSS classes or styles:
<<wikitext-example src:"@@.myStyle
* List One
* List Two
@@
">>
Similar syntax is used to assign styles. For example:
<<wikitext-example src:"@@background-color:red;
* List One
* List Two
@@
">>
Multiple styles and classes can be mixed. For example:
<<wikitext-example src:"@@.tw-tiddler-frame
@@width:400px;
Some text
@@
">>
You can also assign a CSS class to an individual member of a list with this notation:
<<wikitext-example src:"* List One
*.MyClass List Two
* List Three
">>
! Typographic Features
You can create an n-dash with a double hyphen `--` and an m-dash with a triple hyphen `---`. For example -- this is an example --- and so is this
You can include a horizontal rule with three or more dashes on their own on a line:
<<wikitext-example src:"
---
">>
! Macros
Macros are snippets of text that can be inserted with a concise shortcut. A macro is defined like this:
```
\define mysamplemacro(name:"Bugs Bunny",address:"Rabbit Hole Hill")
Hi, I'm $name$ and I live in $address$
\end
```
The first line of the definition specifies the macro name and any parameters. Parameters are named and can optionally have default values that are used if the parameter isn't specified at the time of calling. The body of the macro definition follows, terminated with `\end`. The macro can include parameters using the `$name$` construction.
Macro definitions must be placed at the top of a tiddler. Macros are available to the tiddler that defines them, plus any tiddlers that it transcludes.
Macros are used like this:
```
<<mysamplemacro>>
<<mysamplemacro "Donald Duck">>
<<mysamplemacro "Mickey Mouse" "Mouse House">>
```
Resulting in:
```
Hi I'm Bugs Bunny and I live in Rabbit Hole Hill
Hi I'm Donald Duck and I live in Rabbit Hole Hill
Hi I'm Mickey Mouse and I live in Mouse House
```
! HTML in WikiText
HTML tags and comments can be used directly in WikiText. For example:
```
<article class="hello">
This is my nice and simple block of text. HelloThere
<!-- This comment will not appear in the wikified output -->
</article>
```
Attributes in HTML tags can be specified as a transclusion or a macro invocation. For example, here the value of the `href` attribute will be set to the value of the tiddler MyLinkDestination:
```
<a href={{MyLinkDestination}}>link</a>
```
Here an attribute is specified as a macro invocation:
```
<a href=<<MyMacro "Brian">>>link</a>
```
! Widgets
Widgets provide rich functionality within WikiText. For example, the `<$video>` widget can be used to embed videos from YouTube, Vimeo or the Internet Archive:
```
<$video src="32001208" type="vimeo" />
```
For full details of the available widgets, see the [[Docs]].
! Headings
Headings are specified with one or more leading `!` characters:
```
! This is a level 1 heading
!! This is a level 2 heading
!!! This is a level 3 heading
```
CSS classes can be assigned to individual headings like this:
```
!.myStyle This heading has the class `myStyle`
```
! Other WikiText features
!! Typed Blocks
You can incorporate text of a different type within blocks of WikiText. For example:
```
$$$.js
return 2 + "string";
$$$
```
Renders as:
$$$.js
return 2 + "string";
$$$
See TypedBlockWikiText for more details
<$list filter="[tag[wikitext]sort[title]]"/>

View File

@@ -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.

View File

@@ -1,7 +1,5 @@
created: 201308281853
creator: JeremyRuston
modified: 201308281853
modifier: JeremyRuston
tags: definitions
title: CamelCase

View File

@@ -1,7 +1,5 @@
created: 201308281859
creator: JeremyRuston
modified: 201308281859
modifier: JeremyRuston
tags: definitions concepts
title: ContentType

View File

@@ -1,7 +1,5 @@
created: 201308251549
creator: JeremyRuston
modified: 201308251604
modifier: JeremyRuston
tags: definitions
title: FederatialLimited

View File

@@ -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;
}
```

View File

@@ -1,7 +1,5 @@
created: 201308251625
creator: JeremyRuston
modified: 201308251625
modifier: JeremyRuston
tags: definitions
title: JeremyRuston

View File

@@ -1,7 +1,5 @@
created: 201308281902
creator: JeremyRuston
modified: 201308281902
modifier: JeremyRuston
tags: definitions
title: Jermolene

View File

@@ -1,7 +1,5 @@
created: 201309012131
creator: JeremyRuston
modified: 201309012131
modifier: JeremyRuston
tags: demo definitions
title: MathML

View File

@@ -1,7 +1,5 @@
created: 201308251307
creator: JeremyRuston
modified: 201308251307
modifier: JeremyRuston
tags: definitions
title: OpenSource

View File

@@ -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]].

View File

@@ -1,7 +1,5 @@
created: 201308221740
creator: JeremyRuston
modified: 201308231751
modifier: JeremyRuston
tags: definitions
title: SingleFileApplication

View File

@@ -1,7 +1,5 @@
created: 201308221739
creator: JeremyRuston
modified: 201308231751
modifier: JeremyRuston
tags: definitions
title: SinglePageApplication

View File

@@ -1,7 +1,5 @@
created: 20130825161100000
creator: JeremyRuston
modified: 20131129093610165
modifier: JeremyRuston
tags: definitions
title: TiddlyFox
type: text/vnd.tiddlywiki

View 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]].

View File

@@ -1,7 +1,5 @@
created: 201308300842
creator: JeremyRuston
modified: 201308300842
modifier: JeremyRuston
tags: definitions
title: TiddlySpace

View File

@@ -1,7 +1,5 @@
created: 201308300841
creator: JeremyRuston
modified: 201308300843
modifier: JeremyRuston
tags: definitions
title: TiddlyWeb

View File

@@ -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.

View File

@@ -1,7 +1,5 @@
created: 201308251500
creator: JeremyRuston
modified: 201308251621
modifier: JeremyRuston
tags: deserializers dev
title: TiddlerFiles

View 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
```

View 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.

View File

@@ -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

View 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.

Some files were not shown because too many files have changed in this diff Show More