1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2026-01-25 12:23:42 +00:00

Compare commits

..

54 Commits

Author SHA1 Message Date
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
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
Jermolene
28d6627632 Version update 2013-11-30 15:19:11 +00:00
Jermolene
91f10af53f Fixed small but important bug that prevented downloading an empty wiki 2013-11-30 15:17:42 +00:00
Jermolene
ba796c3f23 Update version number and ribbon colour ready for the next release 2013-11-30 13:58:03 +00:00
74 changed files with 934 additions and 478 deletions

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

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

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

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

@@ -385,6 +385,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

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,

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

@@ -146,11 +146,12 @@ NavigatorWidget.prototype.handleCloseOtherTiddlersEvent = function(event) {
NavigatorWidget.prototype.handleEditTiddlerEvent = function(event) {
this.getStoryList();
// Replace the specified tiddler with a draft in edit mode
var draftTiddler = this.getDraftTiddler(event.tiddlerTitle),
var title = event.param || event.tiddlerTitle,
draftTiddler = this.getDraftTiddler(title),
gotOne = false;
for(var t=this.storyList.length-1; t>=0; t--) {
// Replace the first story instance of the original tiddler name with the draft title
if(this.storyList[t] === event.tiddlerTitle) {
if(this.storyList[t] === title) {
if(!gotOne) {
this.storyList[t] = draftTiddler.fields.title;
gotOne = true;
@@ -169,18 +170,19 @@ NavigatorWidget.prototype.handleEditTiddlerEvent = function(event) {
// 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);
// 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"]);
}
// 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);
var slot = this.findTitleInStory(title,-1);
if(slot !== -1) {
this.storyList.splice(slot,1);
this.saveStoryList();
@@ -235,10 +237,11 @@ 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
var title = event.param || event.tiddlerTitle,
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(this.storyList[t] === title) {
var tiddler = this.wiki.getTiddler(title);
if(tiddler) {
var draftTitle = (tiddler.fields["draft.title"] || "").trim(),
draftOf = (tiddler.fields["draft.of"] || "").trim();
@@ -256,7 +259,7 @@ NavigatorWidget.prototype.handleSaveTiddlerEvent = function(event) {
"draft.of": undefined
},this.wiki.getModificationFields()));
// Remove the draft tiddler
this.wiki.deleteTiddler(event.tiddlerTitle);
this.wiki.deleteTiddler(title);
// Remove the original tiddler if we're renaming it
if(isRename) {
this.wiki.deleteTiddler(draftOf);
@@ -282,22 +285,23 @@ NavigatorWidget.prototype.handleSaveTiddlerEvent = function(event) {
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);
// Flip the specified tiddler from draft back to the original
var draftTitle = event.param || event.tiddlerTitle,
draftTiddler = this.wiki.getTiddler(draftTitle);
if(draftTiddler && draftTiddler.hasField("draft.of")) {
var originalTitle = draftTiddler.fields["draft.of"];
// Remove the draft tiddler
this.wiki.deleteTiddler(draftTitle);
// Swap the draft for the original in the story
for(var t=0; t<this.storyList.length; t++) {
if(this.storyList[t] === draftTitle) {
// Make the story record point to the original tiddler
this.storyList[t] = tiddler.fields["draft.title"];
// Check if we're modifying the story tiddler itself
if(tiddler.fields["draft.title"] === this.storyTitle) {
storyTiddlerModified = true;
}
this.storyList[t] = originalTitle;
storyTiddlerModified = true;
}
}
}
if(!storyTiddlerModified) {
if(storyTiddlerModified) {
this.saveStoryList();
}
return false;
@@ -359,21 +363,21 @@ 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(self.storyList.indexOf(title) === -1) {
self.storyList.unshift(title);
}
// And to history
history.push({title: title});
}
// And to history
history.push({title: title});
});
// Save the updated story and history
this.saveStoryList();

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

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

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

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

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

@@ -21,7 +21,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
@@ -36,3 +36,4 @@ The TiddlyWiki discussion groups are mailing lists for talking about TiddlyWiki:
|!Site |!Description |
|http://freedombits.org |A manifesto for the preservation of free speech through the exchange of randomized data |
|http://giffmex.org/nt/1johnnotebase.html |A study notebook for the Bible ||

View File

@@ -1,6 +1,6 @@
created: 201311011114
creator: JeremyRuston
modified: 201311011114
modified: 201311301614
modifier: JeremyRuston
tags: introduction
title: Contributing
@@ -26,8 +26,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,41 @@
created: 201308241418
created: 20130824141800000
creator: JeremyRuston
modified: 201308251303
modified: 20131206163714703
modifier: JeremyRuston
tags: introduction
title: Docs
type: text/vnd.tiddlywiki
\define bulletList(tag)
{{$tag$}}
<ul><$list filter="[tag[$tag$]]"><li><$link to={{!!title}}><$view field="title"/></$link></li></$list></ul>
\end
This is the main documentation hub for TiddlyWiki. See also the DeveloperDocs.
! Editions
TiddlyWiki5 can be used via these editions:
<$list filter="[tag[edition]sort[title]]" type="ul"/>
! 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,12 +1,12 @@
created: 20130822172800000
creator: JeremyRuston
modified: 20131129163630584
modified: 20131203112520519
modifier: JeremyRuston
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]]

View File

@@ -1,12 +1,14 @@
created: 20131129090249275
creator: JeremyRuston
modified: 20131129171927975
modified: 20131206172416371
modifier: JeremyRuston
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]].
[[Video Tutorials]] are available, too.
! The 'works anywhere' method
{{Saving with the HTML5 fallback saver}}
@@ -23,4 +25,6 @@ Saving changes as described above is quite inconvenient because of the degree of
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 TiddlySpot]], a free service that lets you use TiddlyWiki online

View File

@@ -1,6 +1,6 @@
created: 20130822170200000
creator: JeremyRuston
modified: 20131130073307697
modified: 20131206165151008
modifier: JeremyRuston
tags: introduction
title: HelloThere
@@ -10,11 +10,12 @@ Welcome to TiddlyWiki5, a reboot of TiddlyWiki, the non-linear personal web note
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.
//TiddlyWiki is a free, open source project that depends on [[your love and support|HelpingTiddlyWiki]] for its survival//.
//TiddlyWiki5 and TiddlyWiki Classic are free, open source projects that depend 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/.
!! TiddlyWiki Classic - http://tiddlywiki.com
The deep internal improvements mean that TiddlyWiki5 is not fully compatible with older versions. Existing content will need massaging, while plugins and themes will have to be completely rewritten. The upgrade path will get smoother as TiddlyWiki5 matures.
</div>

View File

@@ -1,6 +1,6 @@
created: 20130825160500000
creator: JeremyRuston
modified: 20131126195146799
modified: 20131206172505397
modifier: JeremyRuston
tags: community
title: HelpingTiddlyWiki
@@ -17,6 +17,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

@@ -4,6 +4,7 @@ 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

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

@@ -4,6 +4,7 @@ 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

@@ -4,6 +4,7 @@ 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

@@ -4,6 +4,7 @@ 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,11 @@
created: 20131119125600007
creator: JeremyRuston
modified: 20131129095531749
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

@@ -0,0 +1,14 @@
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]]//
!! Bug fixes
* Fixes a small but important bug that prevented downloading an empty wiki with alpha.16

View File

@@ -0,0 +1,27 @@
created: 20131201132300007
creator: JeremyRuston
modified: 20131206161343895
modifier: JeremyRuston
tags: releasenote
title: Release 5.0.1-alpha
type: text/vnd.tiddlywiki
//[[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

@@ -1,14 +1,16 @@
created: 201311091054007
created: 20131109105400007
creator: JeremyRuston
modified: 201311091054007
modified: 20131203093653197
modifier: JeremyRuston
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

@@ -0,0 +1,34 @@
created: 20131202102427114
creator: JeremyRuston
modified: 20131205175047321
modifier: JeremyRuston
tags: howto
title: Upgrading
type: text/vnd.tiddlywiki
There are several methods for upgrading an existing TiddlyWiki5 document to a new release.
! Online upgrading
Note that none of your personal data leaves your browser with this process.
# Visit http://five.tiddlywiki.com/empty.html
# Drag your old TiddlyWiki5 HTML file into the browser window
#* Your tiddlers should be imported
# Save changes to save the new version
//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,287 +1,11 @@
created: 20131205155227468
creator: JeremyRuston
modified: 20131205161350589
modifier: JeremyRuston
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

@@ -0,0 +1,44 @@
created: 20131202081424080
creator: JeremyRuston
modified: 20131203093908677
modifier: JeremyRuston
tags: dev
title: TiddlyWiki5 Versioning
type: text/vnd.tiddlywiki
Each release of TiddlyWiki5 is identified by a version number that complies with the [[Semantic Versioning 2.0.0|http://semver.org/]] standard.
! TiddlyWiki Core Version
According to the standard:
```
Given a version number MAJOR.MINOR.PATCH, increment the:
MAJOR version when you make incompatible API changes,
MINOR version when you add functionality in a backwards-compatible manner, and
PATCH version when you make backwards-compatible bug fixes.
Additional labels for pre-release and build metadata are available as extensions to the MAJOR.MINOR.PATCH format.
```
!! Alpha and Beta versions
While in alpha TiddlyWiki5 uses the pre-release label "alpha", for example:
```
5.0.1-alpha
```
Each new alpha or beta release will bump the `PATCH` version number. This breaks the strict semantics of versioning because `PATCH` increments are supposed to be reserved for compatible changes.
//Note that prior to ''5.0.1-alpha'', TiddlyWiki5 used version numbers formatted as ''5.0.0-alpha.19''. The change was made to enable the upgrade mechanism to recognise plugin updates from the version information.//
!! Interim versions
During development when a new release is being prepared, the pre-release label is set to `prerelease`.
! Plugin Versions
Version numbers
TiddlyWiki5 uses the version information attached to plugins for determining which of two plugins is more recent during an upgrade or import. The pre-release label is ignored when performing these comparisons.

View File

@@ -0,0 +1,26 @@
created: 20131203074550710
creator: JeremyRuston
modified: 20131203075203153
modifier: JeremyRuston
tags: introduction dev
title: TiddlyWiki5 for Developers
type: text/vnd.tiddlywiki
TiddlyWiki5 is published as OpenSource which means that anyone can read the code and contribute to its development. It's a big, complex piece of software and can be overwhelming to newcomers.
! Resources
! The one thing you need to know
TiddlyWiki5's architecture is very different from an HTML page written using jQuery. This section concisely explains what TiddlyWiki5 does differently. It may not make much sense on the first reading.
The key to understanding how TW5 works internally is to see that the RefreshMechanism requires that any region of the DOM can be regenerated at any time. This means that the entire state of the user interface must reside in the tiddler store, and not in the DOM.
It also determines the standard UI flow:
# An event handler on a widget is triggered
# The event handler can manipulate the DOM nodes directly created by the widget, and/or modify the state of the tiddler store
# The core then issues a store change event which triggers the refresh cycle
# Each widget in the tree then gets a chance to refresh itself to reflect the changes in the store if they need to
From a technical perspective, TiddlyWiki5 is a fairly classic MVC architecture, with strict separation of concerns. The model is the tiddler store, the view is a rendering tree (such as the one created from $:/core/ui/PageMacros in startup.js), and the controller is the TW5 core code itself.

View File

@@ -1,12 +1,13 @@
created: 201308251621
created: 20130825162100000
creator: JeremyRuston
modified: 201308251621
modified: 20131203074943344
modifier: JeremyRuston
tags: dev
title: TiddlyWikiArchitecture
type: text/vnd.tiddlywiki
The heart of TiddlyWiki can be seen as an extensible representation transformation engine for text and images. Given the text of a tiddler and its associated ContentType, the engine can produce a rendering of the tiddler in a new ContentType. Furthermore, it can efficiently selectively update the rendering to track any changes in the tiddler or its dependents.
The primary use of the engine is to convert raw `text/vnd.tiddlywiki` WikiText into a `text/html` or `text/plain` representation for display. The transclusion and templating features of WikiText allow the engine to also be used to generate TiddlyWiki HTML files from raw tiddlers.
If you're interested in understanding more about the internal operation of TiddlyWiki, it is recommended that you review the DeveloperDocs and read the code -- start with the boot kernel [[$:/boot/boot.js]].
If you're interested in understanding more about the internal operation of TiddlyWiki, start by reviewing [[TiddlyWiki5 for Developers]] and then read the code -- start with the boot kernel [[$:/boot/boot.js]].

View File

@@ -0,0 +1,15 @@
created: 20131206172428247
creator: JeremyRuston
modified: 20131206172436204
modifier: JeremyRuston
tags: howto
title: Video Tutorials
type: text/vnd.tiddlywiki
The aim is to curate a series of videos to guide people through getting up and running with TiddlyWiki. [[Contributions|HelpingTiddlyWiki]] are welcome.
! Getting Started
This brief tutorial takes you through the basics of saving changes with a standalone TiddlyWiki5 file.
<iframe width="560" height="315" src="http://www.youtube.com/embed/1g66s7UbyuU" frameborder="0" allowfullscreen></iframe>

View File

@@ -0,0 +1,11 @@
created: 20130825161400000
creator: JeremyRuston
modified: 20131203112539560
modifier: JeremyRuston
tags: howto
title: Saving on Android
type: text/vnd.tiddlywiki
The AndTidWiki app for Android devices makes it possible to edit and save changes to TiddlyWiki5, including working offline without a network connection.
//Note that AndTidWiki is published independently of TiddlyWiki//

View File

@@ -1,9 +1,10 @@
created: 201308252135
created: 20130825213500000
creator: JeremyRuston
modified: 201308252135
modified: 20131203112307327
modifier: JeremyRuston
tags: definitions
title: TiddlySpot
tags: howto
title: Saving on TiddlySpot
type: text/vnd.tiddlywiki
TiddlySpot is a free hosting service for TiddlyWiki documents from Simon and Daniel Baird. It has been in operation almost as long as TiddlyWiki itself.
@@ -13,5 +14,6 @@ TiddlyWiki5 isn't yet built in to TiddlySpot but you can use it by following the
# Open TiddlyWiki5 in your browser from http://five.tiddlywiki.com/empty.html
# Fill in the TiddlySpot wikiname and password in the control panel
# Click the "Save Changes" button. You should get a confirmation notification at the top right saying ''Saved wiki''. Saving can take several seconds if you're on a slow connection or working with a large wiki.
#* //This step won't work in Firefox thanks to its default security policy. Google Chrome works fine//
# Navigate to your TiddlySpot URL at http://{wikiname}.tiddlyspot.com/
# You should see a copy of TiddlyWiki5. You can edit and create tiddlers, and click "Save Changes" to save changes back up to TiddlySpot (you'll need to re-enter your password the first time you visit the wiki on TiddlySpot)

View File

@@ -1,6 +1,6 @@
created: 20131129092753119
creator: JeremyRuston
modified: 20131130073126246
modified: 20131205151815248
modifier: JeremyRuston
tags: howto
title: Saving with TiddlyFox
@@ -11,8 +11,8 @@ type: text/vnd.tiddlywiki
#* https://addons.mozilla.org/en-US/firefox/addon/tiddlyfox/
# Restart [[Firefox]]
# [[Download]] an empty TiddlyWiki by clicking this button:
#* {{$:/editions/tw5.com/snippets/download-empty-button}}
#* Your browser may ask you to accept the download before it begins
#> {{$:/editions/tw5.com/snippets/download-empty-button}}
#> Your browser may ask you to accept the download before it begins
# Locate the file you just downloaded
#* You may rename it, but be sure to keep the `.html` extension
# Open the file in [[Firefox]]

View File

@@ -1,6 +1,6 @@
created: 20131129092604900
creator: JeremyRuston
modified: 20131130073142081
modified: 20131205151828564
modifier: JeremyRuston
tags: howto
title: Saving with the HTML5 fallback saver
@@ -9,8 +9,8 @@ type: text/vnd.tiddlywiki
This method of saving changes is clunky but has the advantage of working on almost all desktop browsers, and many mobile browsers.
# [[Download]] an empty TiddlyWiki by clicking this button:
#* {{$:/editions/tw5.com/snippets/download-empty-button}}
#* Your browser may ask you to accept the download before it begins
#> {{$:/editions/tw5.com/snippets/download-empty-button}}
#> Your browser may ask you to accept the download before it begins
# Locate the file you just downloaded
#* You may rename it, but be sure to keep the `.html` extension
# Open the file in your browser

View File

@@ -1,12 +1,13 @@
created: 20131127215321439
creator: JeremyRuston
modified: 20131128181252154
modified: 20131202102344517
modifier: JeremyRuston
title: $:/DefaultTiddlers
type: text/vnd.tiddlywiki
HelloThere
GettingStarted
Upgrading
Features
Community
RoadMap

View File

@@ -1,3 +1,3 @@
title: $:/editions/tw5.com/snippets/download-empty-button
<$button message="tw-download-file" param="$:/editions/tw5.com/save-empty" class="btn-big-green">Download Empty {{$:/core/images/save-button}}</$button>
<$button message="tw-download-file" param="$:/editions/tw5.com/download-empty" class="btn-big-green">Download Empty {{$:/core/images/save-button}}</$button>

View File

@@ -1,5 +1,5 @@
title: $:/editions/tw5.com/github-fork-ribbon
tags: $:/tags/PageTemplate
<div class="github-fork-ribbon-wrapper right" style><div class="github-fork-ribbon" style="background-color:#12991D;"><$link to="ReleaseHistory"><<version>></$link></div>
<div class="github-fork-ribbon-wrapper right" style><div class="github-fork-ribbon" style="background-color:#A3D53A;"><$link to="ReleaseHistory"><<version>></$link></div>
</div>

View File

@@ -0,0 +1,8 @@
created: 20131206164500332
creator: JeremyRuston
modified: 20131206164518144
modifier: JeremyRuston
title: widget
type: text/vnd.tiddlywiki
Widgets add dynamic functionality to WikiText.

View File

@@ -0,0 +1,68 @@
created: 20131206154636572
creator: JeremyRuston
modified: 20131206162157596
modifier: JeremyRuston
tags: wikitext
title: Block Quotes in WikiText
type: text/vnd.tiddlywiki
There are two ways to produce HTML block quotes in TiddlyWiki5, one for content spread across multiple lines, and one for single line content.
! Multi-line Block Quotes
The syntax for multi-line block quotes is:
<<wikitext-example src:"<<<
This is a block quoted paragraph
written in English
<<<
">>
!! Citation
A citation can be added to the quote like this:
<<wikitext-example src:"<<<
Computers are like a bicycle for our minds
<<< Steve Jobs
">>
!! CSS Classes
CSS classes can be added to a block quote:
<<wikitext-example src:"<<<.myClass.another-class
Operating systems are like a brick wall for our minds
<<< Nobody
">>
! Single-line Block Quotes
The single-line syntax for block quotes is actually an extension of the syntax for [[Lists in WikiText]]. For example:
<<wikitext-example src:"> Quoted text
> Another line of quoted text
">>
You can also nest quotes like this:
```
> A top quote
>> A subquote
> Another top quote
```
Which renders as:
> A top quote
>> A subquote
> Another top quote
You can also mix block quotes with other list items. For example:
<<wikitext-example src:"* List One
** List Two
**> A quote
**> Another quote
* List Three
">>

View File

@@ -0,0 +1,23 @@
created: 20131205160047557
creator: JeremyRuston
modified: 20131205160108132
modifier: JeremyRuston
tags: wikitext
title: Code Blocks in WikiText
type: text/vnd.tiddlywiki
You can 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
```

View File

@@ -0,0 +1,9 @@
created: 20131205160641986
creator: JeremyRuston
modified: 20131205160653909
modifier: JeremyRuston
tags: wikitext
title: Dashes in WikiText
type: text/vnd.tiddlywiki
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

View File

@@ -0,0 +1,15 @@
created: 20131205160424246
creator: JeremyRuston
modified: 20131205160450910
modifier: JeremyRuston
tags: wikitext
title: Definitions in WikiText
type: text/vnd.tiddlywiki
HTML definition lists are created with this syntax:
<<wikitext-example src:"; Term being defined
: Definition of that term
; Another term
: Another definition
">>

View File

@@ -0,0 +1,19 @@
created: 20131205155959399
creator: JeremyRuston
modified: 20131205160130832
modifier: JeremyRuston
tags: wikitext
title: Formatting in WikiText
type: text/vnd.tiddlywiki
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
See also: [[Code Blocks in WikiText]]

View File

@@ -0,0 +1,28 @@
created: 20131205160816081
creator: JeremyRuston
modified: 20131205160828313
modifier: JeremyRuston
tags: wikitext
title: HTML in WikiText
type: text/vnd.tiddlywiki
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>
```

View File

@@ -0,0 +1,23 @@
created: 20131205161234909
creator: JeremyRuston
modified: 20131205161256525
modifier: JeremyRuston
tags: wikitext
title: Headings in WikiText
type: text/vnd.tiddlywiki
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`
```

View File

@@ -0,0 +1,13 @@
created: 20131205160706975
creator: JeremyRuston
modified: 20131205160719633
modifier: JeremyRuston
tags: wikitext
title: Horizontal Rules in WikiText
type: text/vnd.tiddlywiki
You can include a horizontal rule with three or more dashes on their own on a line:
<<wikitext-example src:"
---
">>

View File

@@ -0,0 +1,17 @@
created: 20131205160221762
creator: JeremyRuston
modified: 20131205160234142
modifier: JeremyRuston
tags: wikitext
title: Images in WikiText
type: text/vnd.tiddlywiki
To display an image stored in a tiddler just transclude that tiddler:
```
{{Motovun Jack.jpg}}
```
Renders as:
{{Motovun Jack.jpg}}

View File

@@ -0,0 +1,19 @@
created: 20131205155230596
creator: JeremyRuston
modified: 20131205155813974
modifier: JeremyRuston
tags: wikitext
title: Linking in WikiText
type: text/vnd.tiddlywiki
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/` or `[[TW5|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">>

View File

@@ -0,0 +1,55 @@
created: 20131205160257619
creator: JeremyRuston
modified: 20131206154613715
modifier: JeremyRuston
tags: wikitext
title: Lists in WikiText
type: text/vnd.tiddlywiki
! Unordered Lists
You can create unordered lists with `*` characters:
<<wikitext-example src:"* First list item
* Second list item
** A subitem
* Third list item
">>
! Ordered Lists
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
">>
! CSS Classes
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
">>
! Mixing Lists and Block Quotes
Note that [[Block Quotes in WikiText]] can be mixed with lists. For example:
<<wikitext-example src:"* List One
** List Two
**> A quote
**> Another quote
* List Three
">>

View File

@@ -0,0 +1,36 @@
created: 20131205160746466
creator: JeremyRuston
modified: 20131205160758948
modifier: JeremyRuston
tags: wikitext
title: Macros in WikiText
type: text/vnd.tiddlywiki
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
```

View File

@@ -0,0 +1,22 @@
created: 20131205155836435
creator: JeremyRuston
modified: 20131205155853526
modifier: JeremyRuston
tags: wikitext
title: Paragraphs in WikiText
type: text/vnd.tiddlywiki
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">>

View File

@@ -0,0 +1,31 @@
created: 20131205160532119
creator: JeremyRuston
modified: 20131205160549129
modifier: JeremyRuston
tags: wikitext
title: Styles and Classes in WikiText
type: text/vnd.tiddlywiki
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
@@
">>

View File

@@ -1,9 +1,10 @@
created: 201309141321
created: 20130914132100000
creator: JeremyRuston
modified: 201309141355
modified: 20131205161224607
modifier: JeremyRuston
tags: wikitextrule
title: TableWikiText
tags: wikitext
title: Tables in WikiText
type: text/vnd.tiddlywiki
! Basics

View File

@@ -0,0 +1,19 @@
created: 20131205160146648
creator: JeremyRuston
modified: 20131205160204570
modifier: JeremyRuston
tags: wikitext
title: Transclusion in WikiText
type: text/vnd.tiddlywiki
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}}}
```

View File

@@ -1,5 +1,10 @@
title: TypedBlockWikiText
tags: wikitextrule
created: 20131205161051792
creator: JeremyRuston
modified: 20131205161130352
modifier: JeremyRuston
tags: wikitext
title: Typed Blocks in WikiText
type: text/vnd.tiddlywiki
WikiText can include blocks of text that are rendered with an explicit ContentType like this:

View File

@@ -0,0 +1,12 @@
created: 20131205160840915
creator: JeremyRuston
modified: 20131205161336125
modifier: JeremyRuston
tags: wikitext
title: Widgets in WikiText
type: text/vnd.tiddlywiki
Widgets provide rich functionality within WikiText.
<$list filter="[tag[widget]sort[title]]"/>

View File

@@ -1,55 +0,0 @@
title: StyleBlockWikiText
tags: wikitextrule
This syntax enables you to assign arbitrary styles and classes to generated elements. For example:
```
@@color:#f00;
@@text-decoration:underline;
@@.myClass
This is in red!
@@
```
Generates the results:
@@color:#f00;
@@text-decoration:underline;
@@.myClass
This is in red!
@@
The HTML looks like this:
```
<p class="myClass" style="color:rgb(255, 0, 0); text-decoration:underline;">This is in red!</p>
```
Note that classes and styles can be mixed subject to the rule that styles must precede classes. For example
```
@@.myFirstClass.mySecondClass
@@width:100px;.myThirdClass
This is a paragraph
@@
```
Note that the style block doesn't generate any HTML elements itself, but instead causes the styles to be applied to all of the elements contained within the style block. This means that you can assign styles to elements generated from WikiText. For example, here is a list with some additional styles applied:
```
@@background-color:#00f;
* First item
* Second item
* Third item
@@
```
The generated HTML is:
```
<ul style="background-color: #00f;">
<li>First item</li>
<li>Second item</li>
<li>Third item</li></ul>
```

View File

@@ -119,3 +119,6 @@ Bob Robison, @grayeul, 2013/11/11
Adrian Sampaleanu, @asampal, 2013/11/17
David Jade, @davidjade, 2013/11/30
Stephan Hradek, @Skeeve, 2013/11/30

View File

@@ -1,7 +1,7 @@
{
"name": "tiddlywiki",
"preferGlobal": "true",
"version": "5.0.0-alpha.16",
"version": "5.0.1",
"author": "Jeremy Ruston <jeremy@jermolene.com>",
"description": "a non-linear personal web notebook",
"contributors": [

File diff suppressed because one or more lines are too long

View File

@@ -66,6 +66,12 @@ code {
<<border-radius 3px>>
}
blockquote {
border-left: 5px solid #ddd;
margin-left: 25px;
padding-left: 10px;
}
/*
Markdown likes putting code elements inside pre elements
*/
@@ -207,7 +213,7 @@ a.tw-tiddlylink-external {
.btn-big-green {
padding: 8px;
margin: 8px;
margin: 4px 8px 4px 8px;
background: #34C734;
color: #fff;
fill: #fff;
@@ -392,7 +398,6 @@ a.tw-tiddlylink-external {
*/
.tw-tiddler-frame {
width: {{$:/themes/tiddlywiki/vanilla/metrics##tiddlerwidth}};
margin-bottom: 28px;
background-color: {{$:/themes/tiddlywiki/vanilla/colourmappings##tiddlerbackground}};
}
@@ -435,6 +440,7 @@ a.tw-tiddlylink-external {
@media (min-width: 770px) {
.tw-tiddler-frame {
padding: 28px 42px 42px 42px;
width: {{$:/themes/tiddlywiki/vanilla/metrics##tiddlerwidth}};
}
.tw-tiddler-info {

View File

@@ -3,13 +3,13 @@
rem Bump to a new version number
if "x%1" == "x" (
echo Missing version (eg '5.0.0-alpha.99'^)
echo Missing version (eg '5.0.0-alpha'^)
exit 1
)
rem Set the new version number (will also commit and tag the release)
npm version %1 -m "Version update" || exit 1
npm version %1 -m "Version number update for %1" || exit 1
rem Make sure our tags are pushed to the origin server

View File

@@ -4,13 +4,13 @@
if [ -z "$1" ]
then
echo "Missing version (eg '5.0.0-alpha.99')"
echo "Missing version (eg '5.0.0-alpha')"
exit 1
fi
# Set the new version number (will also commit and tag the release)
npm version $1 -m "Version update" || exit 1
npm version $1 -m "Version number update for $1" || exit 1
# Make sure our tags are pushed to the origin server