1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2026-01-23 11:24:40 +00:00

Compare commits

..

74 Commits

Author SHA1 Message Date
jeremy@jermolene.com
c79106fe5b Add docs 2022-02-21 15:23:38 +00:00
jeremy@jermolene.com
aac910ddf3 Merge branch 'master' into direct-style-attributes 2022-02-19 10:12:21 +00:00
jeremy@jermolene.com
1d16206188 Add support for tm-relink-tiddler message 2022-02-19 09:38:48 +00:00
jeremy@jermolene.com
1e30744d88 Merge branch 'master' into direct-style-attributes 2022-02-19 09:20:48 +00:00
jeremy@jermolene.com
37a6ff8521 Move tm-rename-tiddler handling from navigator widget into startup module
This reverses an August 2015 change in 68e15c10641e2eda1e64cf29954786a07326a920; the original rationale was wrong: there is nothing related to the navigator widget in the implementation of the tm-rename-tiddler message
2022-02-19 09:20:32 +00:00
jeremy@jermolene.com
d3ea98fcef Menubar plugin: fix class handling for dropdowns
Fixes  #6457
2022-02-14 10:44:42 +00:00
jeremy@jermolene.com
dac807f938 Merge branch 'master' into direct-style-attributes 2022-02-10 09:00:10 +00:00
Bram Chen
5022516c61 Update chinese language files (#6449)
* Update chinese field descriptions

* Revised chinese translations for `DropMessage`
2022-02-08 16:01:30 +00:00
jeremy@jermolene.com
965d8ee014 Update release note 2022-02-08 15:40:15 +00:00
Marxsal
8e50ad1243 Change 'Drop here' to 'Drop now' in import msg (#6435) 2022-02-07 17:32:06 +00:00
jeremy@jermolene.com
33f40c47c6 Use code-body: yes for more templates
Fixes #6444
2022-02-07 16:53:36 +00:00
Cameron Fischer
1b3c2557b8 Fixed issue: deprecated regexp could cause crash (#6438)
* Fixed issue: deprecated regexp could cause crash

* Different fix which will bother plugins less
2022-02-07 16:39:29 +00:00
jeremy@jermolene.com
1a4766c5a1 Merge branch 'tiddlywiki-com' 2022-02-05 16:39:35 +00:00
jeremy@jermolene.com
e49dda3b48 Fix search results cutoff on narrow screens
Fixes #6440
2022-02-01 09:36:30 +00:00
jeremy@jermolene.com
bd447f0716 Add talk.tiddlywiki.org as the official forum for the community 2022-01-31 17:05:55 +00:00
RJ Skerry-Ryan
13faeaa0bd Markdown: Let WikiText parsing handle the creation of LaTeX widgets. (#6428)
* Markdown: Let WikiText parsing handle the creation of LaTeX widgets.

When embedding LaTeX snippets in inline HTML nodes, such as TiddlyRemember
macros or HTML tables, the parsing of latex nodes breaks the WikiText by
splitting it into pieces around the latex node.

This commit fixes the issue by converting the Remarkable katex nodes back to
text, using a newline to indicate a block katex snippet. This is then re-parsed
by the WikiText KaTeX plugin.

TESTED:

Created a test wiki with:
```
$ node tiddlywiki.js test --init markdowndemo
$ node tiddlywiki.js test --listen
```

* Verified markdown + KaTeX support still works as expected.
* Verified that embedding LaTeX snippets in inline HTML works (e.g. `<a
href="https://example.com/">$x^2$</a>`).
* Verified the markdown + KaTeX support works as expected with renderWikiText
set to `false`.

* Style: Remove spaces between if and opening parentheses.
2022-01-30 11:23:00 +00:00
twMat
7f0fb2b610 [doc] Update Importing Tiddlers.tid - attempt 2 (#6432) 2022-01-30 11:17:39 +00:00
Rizwan
7d2994388b Remove 2 whitespaces (#6434)
These whitespaces were messing the list rendering
2022-01-30 11:07:32 +00:00
RJ Skerry-Ryan
edb5dc3fdc Add keyword-spacing rule to .eslintrc.yml to reflect the project code style. (#6431)
- Update .eslintignore to ignore "third party" code.
- Add a "lint" script to package.json so `npm run lint` runs eslint on the repo.
2022-01-29 17:41:09 +00:00
Marxsal
df1b1316c8 One word change to 'Images in WikiText' (#6430) 2022-01-29 15:39:29 +00:00
jeremy@jermolene.com
1a0c831216 Add sha256 operator 2022-01-29 11:02:47 +00:00
jeremy@jermolene.com
f4365e4bb4 Macro: remove confusing advice
See https://talk.tiddlywiki.org/t/wikitext-parsing-and-rendering-in-macros/2218
2022-01-28 11:24:06 +00:00
Saq Imtiaz
75d10a2dc3 Fix: bug with importvariables widget when importing block mode widgets. fixes #6424 (#6426) 2022-01-27 17:35:18 +00:00
Marxsal
da7cf7a4f3 QualifyWidget documentation (#6422) 2022-01-25 17:59:59 +00:00
Saq Imtiaz
6452eb56a9 fix: bug introduced with 88812092fd fixes #6419 (#6420) 2022-01-24 19:17:09 +00:00
Saq Imtiaz
9fce8153df Add support to tm-scroll message for scrolling without animating (#6410)
* feat: add support for animationDuration attribute of paramObject for tm-scroll message

* docs: added docs for animationDuration attribute of tm-scroll message

* fix: use .utils.hop instead of Object.hasOwnProperty()

* fix: do not check if object before calling utils.hop()

* fix: syntax
2022-01-24 09:44:04 +00:00
jeremy@jermolene.com
4cdfa4e3f9 Update tm-download-file docs to mention the filename parameter 2022-01-23 18:35:38 +00:00
btheado
d6384df6fc Add warnings about non-recursive nature of dynamic attribute values (#6417) 2022-01-23 18:24:25 +00:00
btheado
f0bd06b38d Add doc related to WikiText parser modes (#6415)
* Added macros for displaying wikitext examples in a table

* Added documentation for WikiText parsing

* Changed recognize to British spelling

* Add links to the new wikitext parser tiddlers
2022-01-23 09:44:01 +00:00
Saq Imtiaz
d823856082 feat: add support for renderEnd method for storyviews in widget's render() method (#6409) 2022-01-19 19:48:02 +00:00
twMat
b02a82ba0f Update list-links-draggabe Macro.tid (#6405)
The commented problem is, I presume, resolved now that we can directly edit fields in the current tiddler.
2022-01-19 11:13:08 +00:00
twMat
c43b013539 Paragraph on "anchor links" for Linking in WikiText.tid (#6404) 2022-01-18 19:27:54 +00:00
twMat
5548186c93 Update size attribute in EditTextWidget.tid (#6403)
ref: https://github.com/Jermolene/TiddlyWiki5/issues/6165
2022-01-17 10:11:20 +00:00
twMat
def9b553a8 typo in EventCatcherWidget.tid (#6399) 2022-01-15 12:57:51 +00:00
jeremy@jermolene.com
35f7a8ea06 Fix renaming a tiddler can result in duplicate tags
Fixes #6398
2022-01-14 16:57:30 +00:00
jeremy@jermolene.com
c88017b87f Merge branch 'master' into direct-style-attributes 2022-01-11 17:57:49 +00:00
jeremy@jermolene.com
54bfb28063 Merge branch 'tiddlywiki-com' 2022-01-11 17:51:32 +00:00
jeremy@jermolene.com
80c63b96cf Fix processing of $:/tags/RawMarkupWikified/TopHead tiddlers
Fixes #6395
2022-01-11 17:16:50 +00:00
Nils Lindemann
2ef9ecbc44 Signing the CLA (#6394)
* Using a different account now (Second try)

* Typo
2022-01-10 09:34:02 +00:00
jeremy@jermolene.com
88812092fd Fix crash with "wrap-lines" text editor operation if prefix or suffix is missing
Fixes #6376
2022-01-09 17:43:34 +00:00
jeremy@jermolene.com
4e01fc1838 Radio widget should use default if field/index is missing
Fixes #6389
2022-01-09 17:17:12 +00:00
Louis Davout
5cab75f4a7 In 'Filter Operators' add column to indicate those operators that construct an entirely new selection. (#6351) 2022-01-09 14:44:19 +00:00
btheado
1345384d39 Add section about dynamic links to 'Linking in WikiText' (#6361)
* Add discussion of dynamic links to 'Linking in WikiText'

* Added macro and styles for displaying a 'bad' example

* Use .bad-example macro in 'Linking in WikiText'

* Convert existing warnings to use .bad-example macro
2022-01-09 14:30:22 +00:00
Bram Chen
927013a57a Update chinese field descriptions (#6393) 2022-01-09 14:26:14 +00:00
jeremy@jermolene.com
0d11fccba2 Update release note 2022-01-09 10:18:19 +00:00
jeremy@jermolene.com
d78ad756db Docs missed off 54cfda76ee 2022-01-09 10:18:11 +00:00
jeremy@jermolene.com
373a3f2087 Ensure ordering isn't insertion dependent if orderedAttributes is missing 2022-01-06 22:14:15 +00:00
jeremy@jermolene.com
cf8b113e35 Fix tests
Not all parse tree nodes have an "orderedAttributes" member (eg. the error message generated at 5613bcc884/core/modules/widgets/transclude.js (L73-L75))
2022-01-06 21:23:25 +00:00
jeremy@jermolene.com
15877eef93 Support direct style attributes on the element widget 2022-01-06 20:56:56 +00:00
jeremy@jermolene.com
5613bcc884 It's 2022 2022-01-03 20:22:52 +00:00
jeremy@jermolene.com
0729d730f8 Merge branch 'tiddlywiki-com' 2022-01-03 20:22:05 +00:00
jeremy@jermolene.com
f2422efeb8 Fix issue with Alice in Wonderland demo
Thanks @pmario

See https://github.com/Jermolene/TiddlyWiki5/pull/6213#issuecomment-1003628637
2022-01-03 20:20:48 +00:00
Cameron Fischer
cbb002ec4b Added sourceURL tags to boot js (#6381) 2022-01-03 17:25:40 +00:00
jeremy@jermolene.com
c7e8c87f85 Refine criteria for displaying $:/core/ system tiddlers as code
Fixes #6369
2022-01-03 16:42:50 +00:00
jeremy@jermolene.com
66ae1d6930 Image widget: Add classes for loading/loaded/error 2022-01-02 17:28:54 +00:00
jeremy@jermolene.com
8e3885277f Update messagecatcher widget example to use newer syntax 2021-12-22 15:31:35 +00:00
jeremy@jermolene.com
9293dfa477 Add docs for "help" field of modals
Previously undocumented for no good reason
2021-12-21 10:26:58 +00:00
Louis Davout
8a80d89582 Signing the CLA (#6347) 2021-12-20 19:36:51 +00:00
btheado
10ebd93df3 Add ViewWidget cross references and examples (#6355)
* Link ViewWidget formats to similar filter operators

* Merge the ViewWidget columns and use the tip macro instead

* Reference the format filter operator in ViewWidget

* More accurate language in the ViewWidget docs
2021-12-20 10:07:34 +00:00
jc-ose
d414eef773 Clarify list location requirement (#6338) 2021-12-14 22:27:05 +00:00
jc-ose
7d1f0ea8f4 Signing the CLA (#6337) 2021-12-14 22:26:22 +00:00
twMat
f477e90192 Update Cascade Filter Run Prefix.tid (#6340) 2021-12-14 22:21:49 +00:00
Maurycy Zarzycki
b4dec78a72 add polish translations to cascades (#6335) 2021-12-13 17:28:35 +00:00
jeremy@jermolene.com
60187dc59e Fix importing/upgrading encrypted single file wikis
The problem was that v5.2.0 trimmed the whitespace from $:/core/templates/store.area.template.html which we'd previously been relying on during the import.

This change still allows v5.2.2 to import encrypted pre-v5.2.0 wikis

Fixes #6330
2021-12-11 19:46:20 +00:00
twMat
4453aefad8 Typo in Images in WikiText.tid (#6328)
Typo in link
2021-12-11 09:29:26 +00:00
jeremy@jermolene.com
54cfda76ee ViewTemplateBodyCascade: Add support for code-body field
Missed off #6168
2021-12-09 20:47:51 +00:00
Rizwan
1e8c2821d6 Acknowledgements for banner design 5.1.21-5.2.0 (#6326) 2021-12-09 17:40:12 +00:00
jeremy@jermolene.com
cbc030fbe2 Merge branch 'tiddlywiki-com' 2021-12-09 11:57:16 +00:00
jeremy@jermolene.com
b454116163 Add banner image credits for v5.2.1
See https://talk.tiddlywiki.org/t/the-banner-designer-should-be-acknowledged-in-the-whats-new-section/1787

cc @ibnishak
2021-12-09 11:56:31 +00:00
jeremy@jermolene.com
0186c6490f Edit type dropdown: Add whitespace between description and MIME type 2021-12-08 21:25:44 +00:00
jeremy@jermolene.com
853a899c77 Avoid wraping field names in field viewers
Also avoid wikifying field names
2021-12-08 19:29:02 +00:00
jeremy@jermolene.com
95a3d7fde2 Temporary new release banner for v5.2.2 2021-12-08 12:42:08 +00:00
jeremy@jermolene.com
d33e0a05e2 Preparing for v5.2.2-prerelease 2021-12-08 12:22:51 +00:00
jeremy@jermolene.com
cb833b3f65 build-site.sh: Update version number 2021-12-08 12:21:16 +00:00
106 changed files with 4764 additions and 240 deletions

View File

@@ -1,15 +1,8 @@
# Known minified files
# Ignore "third party" code whose style we will not change.
/boot/sjcl.js
/core/modules/utils/base64-utf8/base64-utf8.module.js
/core/modules/utils/base64-utf8/base64-utf8.module.min.js
/core/modules/utils/diff-match-patch/diff_match_patch.js
/plugins/tiddlywiki/async/files/async.min.v1.5.0.js
/plugins/tiddlywiki/codemirror-autocomplete/files/addon/hint/anyword-hint.js
/plugins/tiddlywiki/codemirror-autocomplete/files/addon/hint/css-hint.js
/plugins/tiddlywiki/codemirror-autocomplete/files/addon/hint/html-hint.js
/plugins/tiddlywiki/codemirror-autocomplete/files/addon/hint/javascript-hint.js
/plugins/tiddlywiki/codemirror-autocomplete/files/addon/hint/show-hint.js
/plugins/tiddlywiki/codemirror-autocomplete/files/addon/hint/xml-hint.js
/plugins/tiddlywiki/codemirror-closebrackets/files/addon/edit/closebrackets.js
/plugins/tiddlywiki/codemirror-closebrackets/files/addon/edit/matchbrackets.js
/plugins/tiddlywiki/codemirror-closetag/files/addon/edit/closetag.js
/plugins/tiddlywiki/codemirror-closetag/files/addon/fold/xml-fold.js
/core/modules/utils/diff-match-patch/diff_match_patch_uncompressed.js
/core/modules/utils/dom/csscolorparser.js
/plugins/tiddlywiki/*/files/

View File

@@ -64,7 +64,23 @@ rules:
init-declarations: 'off'
jsx-quotes: error
key-spacing: 'off'
keyword-spacing: 'off'
keyword-spacing:
- error
- before: true
after: false
overrides:
'case':
after: true
'do':
'after': true
'else':
after: true
'return':
after: true
'throw':
after: true
'try':
after: true
line-comment-position: 'off'
linebreak-style: 'off'
lines-around-comment: 'off'

View File

@@ -5,7 +5,7 @@
# Default to the current version number for building the plugin library
if [ -z "$TW5_BUILD_VERSION" ]; then
TW5_BUILD_VERSION=v5.2.0
TW5_BUILD_VERSION=v5.2.2
fi
echo "Using TW5_BUILD_VERSION as [$TW5_BUILD_VERSION]"

View File

@@ -2649,3 +2649,4 @@ if(typeof(exports) !== "undefined") {
} else {
_boot(window.$tw);
}
//# sourceURL=$:/boot/boot.js

View File

@@ -117,3 +117,4 @@ if(typeof(exports) === "undefined") {
// Export functionality as a module
exports.bootprefix = _bootprefix;
}
//# sourceURL=$:/boot/bootprefix.js

View File

@@ -4,7 +4,7 @@ type: text/plain
TiddlyWiki created by Jeremy Ruston, (jeremy [at] jermolene [dot] com)
Copyright (c) 2004-2007, Jeremy Ruston
Copyright (c) 2007-2021, UnaMesa Association
Copyright (c) 2007-2022, UnaMesa Association
All rights reserved.
Redistribution and use in source and binary forms, with or without

View File

@@ -3,6 +3,7 @@ title: $:/language/Docs/Fields/
_canonical_uri: The full URI of an external image tiddler
bag: The name of the bag from which a tiddler came
caption: The text to be displayed on a tab or button
code-body: The view template will display the tiddler as code if set to ''yes''
color: The CSS color value associated with a tiddler
component: The name of the component responsible for an [[alert tiddler|AlertMechanism]]
current-tiddler: Used to cache the top tiddler in a [[history list|HistoryMechanism]]
@@ -13,9 +14,9 @@ description: The descriptive text for a plugin, or a modal dialogue
draft.of: For draft tiddlers, contains the title of the tiddler of which this is a draft
draft.title: For draft tiddlers, contains the proposed new title of the tiddler
footer: The footer text for a wizard
hide-body: The view template will hide bodies of tiddlers if set to: ''yes''
hide-body: The view template will hide bodies of tiddlers if set to ''yes''
icon: The title of the tiddler containing the icon associated with a tiddler
library: Indicates that a tiddler should be saved as a JavaScript library if set to: ''yes''
library: Indicates that a tiddler should be saved as a JavaScript library if set to ''yes''
list: An ordered list of tiddler titles associated with a tiddler
list-before: If set, the title of a tiddler before which this tiddler should be added to the ordered list of tiddler titles, or at the start of the list if this field is present but empty
list-after: If set, the title of the tiddler after which this tiddler should be added to the ordered list of tiddler titles, or at the end of the list if this field is present but empty
@@ -32,7 +33,7 @@ tags: A list of tags associated with a tiddler
text: The body text of a tiddler
throttle.refresh: If present, throttles refreshes of this tiddler
title: The unique name of a tiddler
toc-link: Suppresses the tiddler's link in a Table of Contents tree if set to: ''no''
toc-link: Suppresses the tiddler's link in a Table of Contents tree if set to ''no''
type: The content type of a tiddler
version: Version information for a plugin
_is_skinny: If present, indicates that the tiddler text field must be loaded from the server

View File

@@ -14,7 +14,7 @@ ConfirmAction: Do you wish to proceed?
Count: count
DefaultNewTiddlerTitle: New Tiddler
Diffs/CountMessage: <<diff-count>> differences
DropMessage: Drop here (or use the 'Escape' key to cancel)
DropMessage: Drop now (or use the 'Escape' key to cancel)
Encryption/Cancel: Cancel
Encryption/ConfirmClearPassword: Do you wish to clear the password? This will remove the encryption applied when saving this wiki
Encryption/PromptSetPassword: Set a new password for this TiddlyWiki

View File

@@ -13,15 +13,17 @@ Text editor operation to wrap the selected lines with a prefix and suffix
"use strict";
exports["wrap-lines"] = function(event,operation) {
var prefix = event.paramObject.prefix || "",
suffix = event.paramObject.suffix || "";
// Cut just past the preceding line break, or the start of the text
operation.cutStart = $tw.utils.findPrecedingLineBreak(operation.text,operation.selStart);
// Cut to just past the following line break, or to the end of the text
operation.cutEnd = $tw.utils.findFollowingLineBreak(operation.text,operation.selEnd);
// Add the prefix and suffix
operation.replacement = event.paramObject.prefix + "\n" +
operation.replacement = prefix + "\n" +
operation.text.substring(operation.cutStart,operation.cutEnd) + "\n" +
event.paramObject.suffix + "\n";
operation.newSelStart = operation.cutStart + event.paramObject.prefix.length + 1;
suffix + "\n";
operation.newSelStart = operation.cutStart + prefix.length + 1;
operation.newSelEnd = operation.newSelStart + (operation.cutEnd - operation.cutStart);
};

View File

@@ -95,10 +95,12 @@ function parseFilterOperation(operators,filterString,p) {
if(nextBracketPos === -1) {
throw "Missing closing bracket in filter expression";
}
if(!operator.regexp) {
if(operator.regexp) {
operand.text = "";
} else {
operand.text = filterString.substring(p,nextBracketPos);
operator.operands.push(operand);
}
operator.operands.push(operand);
p = nextBracketPos + 1;
}

View File

@@ -0,0 +1,27 @@
/*\
title: $:/core/modules/filters/crypto.js
type: application/javascript
module-type: filteroperator
Filter operators for cryptography, using the Stanford JavaScript library
\*/
(function(){
/*jslint node: true, browser: true */
/*global $tw: false */
"use strict";
exports.sha256 = function(source,operator,options) {
var results = [],
length = parseInt(operator.operand,10) || 20,
sha256 = function(text) {
return sjcl.codec.hex.fromBits(sjcl.hash.sha256.hash(text)).substr(0,length);
};
source(function(tiddler,title) {
results.push(sha256(title));
});
return results;
};
})();

View File

@@ -51,6 +51,20 @@ exports.startup = function() {
element.focus(event.paramObject);
}
});
// Install the tm-rename-tiddler and tm-relink-tiddler messages
var makeRenameHandler = function(method) {
return function(event) {
var options = {},
paramObject = event.paramObject || {},
from = paramObject.from || event.tiddlerTitle,
to = paramObject.to;
options.dontRenameInTags = (paramObject.renameInTags === "false" || paramObject.renameInTags === "no") ? true : false;
options.dontRenameInLists = (paramObject.renameInLists === "false" || paramObject.renameInLists === "no") ? true : false;
$tw.wiki[method](from,to,options);
};
};
$tw.rootWidget.addEventListener("tm-rename-tiddler",makeRenameHandler("renameTiddler"));
$tw.rootWidget.addEventListener("tm-relink-tiddler",makeRenameHandler("relinkTiddler"));
// Install the scroller
$tw.pageScroller = new $tw.utils.PageScroller();
$tw.rootWidget.addEventListener("tm-scroll",function(event) {

View File

@@ -24,13 +24,13 @@ exports.isDraft = function() {
return this.hasField("draft.of");
};
exports.getFieldString = function(field) {
exports.getFieldString = function(field,defaultValue) {
var value = this.fields[field];
// Check for a missing field
if(value === undefined || value === null) {
return "";
return defaultValue || "";
}
// Parse the field with the associated module (if any)
// Stringify the field with the associated tiddler field module (if any)
var fieldModule = $tw.Tiddler.fieldModules[field];
if(fieldModule && fieldModule.stringify) {
return fieldModule.stringify.call(this,value);

View File

@@ -21,7 +21,7 @@ exports.extractEncryptedStoreArea = function(text) {
if(encryptedStoreAreaStart !== -1) {
var encryptedStoreAreaEnd = text.indexOf("</pre>",encryptedStoreAreaStart);
if(encryptedStoreAreaEnd !== -1) {
return $tw.utils.htmlDecode(text.substring(encryptedStoreAreaStart + encryptedStoreAreaStartMarker.length,encryptedStoreAreaEnd-1));
return $tw.utils.htmlDecode(text.substring(encryptedStoreAreaStart + encryptedStoreAreaStartMarker.length,encryptedStoreAreaEnd));
}
}
return null;

View File

@@ -49,10 +49,14 @@ Handle an event
*/
PageScroller.prototype.handleEvent = function(event) {
if(event.type === "tm-scroll") {
var options = {};
if($tw.utils.hop(event.paramObject,"animationDuration")) {
options.animationDuration = event.paramObject.animationDuration;
}
if(event.paramObject && event.paramObject.selector) {
this.scrollSelectorIntoView(null,event.paramObject.selector);
this.scrollSelectorIntoView(null,event.paramObject.selector,null,options);
} else {
this.scrollIntoView(event.target);
this.scrollIntoView(event.target,null,options);
}
return false; // Event was handled
}
@@ -62,10 +66,10 @@ PageScroller.prototype.handleEvent = function(event) {
/*
Handle a scroll event hitting the page document
*/
PageScroller.prototype.scrollIntoView = function(element,callback) {
PageScroller.prototype.scrollIntoView = function(element,callback,options) {
var self = this,
duration = $tw.utils.getAnimationDuration(),
srcWindow = element ? element.ownerDocument.defaultView : window;
duration = $tw.utils.hop(options,"animationDuration") ? parseInt(options.animationDuration) : $tw.utils.getAnimationDuration(),
srcWindow = element ? element.ownerDocument.defaultView : window;
// Now get ready to scroll the body
this.cancelScroll(srcWindow);
this.startTime = Date.now();
@@ -122,11 +126,11 @@ PageScroller.prototype.scrollIntoView = function(element,callback) {
drawFrame();
};
PageScroller.prototype.scrollSelectorIntoView = function(baseElement,selector,callback) {
PageScroller.prototype.scrollSelectorIntoView = function(baseElement,selector,callback,options) {
baseElement = baseElement || document.body;
var element = baseElement.querySelector(selector);
if(element) {
this.scrollIntoView(element,callback);
this.scrollIntoView(element,callback,options);
}
};

View File

@@ -111,6 +111,16 @@ ImageWidget.prototype.render = function(parent,nextSibling) {
if(this.imageAlt) {
domNode.setAttribute("alt",this.imageAlt);
}
// Add classes when the image loads or fails
$tw.utils.addClass(domNode,"tc-image-loading");
domNode.addEventListener("load",function() {
$tw.utils.removeClass(domNode,"tc-image-loading");
$tw.utils.addClass(domNode,"tc-image-loaded");
},false);
domNode.addEventListener("error",function() {
$tw.utils.removeClass(domNode,"tc-image-loading");
$tw.utils.addClass(domNode,"tc-image-error");
},false);
// Insert element
parent.insertBefore(domNode,nextSibling);
this.domNodes.push(domNode);

View File

@@ -46,7 +46,7 @@ ImportVariablesWidget.prototype.execute = function(tiddlerList) {
this.tiddlerList = tiddlerList || this.wiki.filterTiddlers(this.filter,this);
// Accumulate the <$set> widgets from each tiddler
$tw.utils.each(this.tiddlerList,function(title) {
var parser = widgetPointer.wiki.parseTiddler(title);
var parser = widgetPointer.wiki.parseTiddler(title,{parseAsInline:true});
if(parser) {
var parseTreeNode = parser.tree[0];
while(parseTreeNode && parseTreeNode.type === "set") {

View File

@@ -51,6 +51,9 @@ ListWidget.prototype.render = function(parent,nextSibling) {
} else {
this.storyview = null;
}
if(this.storyview && this.storyview.renderEnd) {
this.storyview.renderEnd();
}
};
/*

View File

@@ -44,8 +44,7 @@ NavigatorWidget.prototype.render = function(parent,nextSibling) {
{type: "tm-fold-tiddler", handler: "handleFoldTiddlerEvent"},
{type: "tm-fold-other-tiddlers", handler: "handleFoldOtherTiddlersEvent"},
{type: "tm-fold-all-tiddlers", handler: "handleFoldAllTiddlersEvent"},
{type: "tm-unfold-all-tiddlers", handler: "handleUnfoldAllTiddlersEvent"},
{type: "tm-rename-tiddler", handler: "handleRenameTiddlerEvent"}
{type: "tm-unfold-all-tiddlers", handler: "handleUnfoldAllTiddlersEvent"}
]);
this.parentDomNode = parent;
this.computeAttributes();
@@ -636,16 +635,6 @@ NavigatorWidget.prototype.handleUnfoldAllTiddlersEvent = function(event) {
});
};
NavigatorWidget.prototype.handleRenameTiddlerEvent = function(event) {
var options = {},
paramObject = event.paramObject || {},
from = paramObject.from || event.tiddlerTitle,
to = paramObject.to;
options.dontRenameInTags = (paramObject.renameInTags === "false" || paramObject.renameInTags === "no") ? true : false;
options.dontRenameInLists = (paramObject.renameInLists === "false" || paramObject.renameInLists === "no") ? true : false;
this.wiki.renameTiddler(from,to,options);
};
exports.navigator = NavigatorWidget;
})();

View File

@@ -64,9 +64,9 @@ RadioWidget.prototype.getValue = function() {
tiddler = this.wiki.getTiddler(this.radioTitle);
if(tiddler) {
if(this.radioIndex) {
value = this.wiki.extractTiddlerDataItem(this.radioTitle,this.radioIndex);
value = this.wiki.extractTiddlerDataItem(this.radioTitle,this.radioIndex,this.radioDefault);
} else {
value = tiddler.getFieldString(this.radioField);
value = tiddler.getFieldString(this.radioField,this.radioDefault);
}
} else {
value = this.radioDefault;

View File

@@ -38,10 +38,14 @@ ScrollableWidget.prototype.handleScrollEvent = function(event) {
if(this.outerDomNode.scrollWidth <= this.outerDomNode.offsetWidth && this.outerDomNode.scrollHeight <= this.outerDomNode.offsetHeight && this.fallthrough === "yes") {
return true;
}
var options = {};
if($tw.utils.hop(event.paramObject,"animationDuration")) {
options.animationDuration = event.paramObject.animationDuration;
}
if(event.paramObject && event.paramObject.selector) {
this.scrollSelectorIntoView(null,event.paramObject.selector);
this.scrollSelectorIntoView(null,event.paramObject.selector,null,options);
} else {
this.scrollIntoView(event.target);
this.scrollIntoView(event.target,null,options);
}
return false; // Handled event
};
@@ -49,9 +53,9 @@ ScrollableWidget.prototype.handleScrollEvent = function(event) {
/*
Scroll an element into view
*/
ScrollableWidget.prototype.scrollIntoView = function(element) {
var duration = $tw.utils.getAnimationDuration(),
srcWindow = element ? element.ownerDocument.defaultView : window;
ScrollableWidget.prototype.scrollIntoView = function(element,callback,options) {
var duration = $tw.utils.hop(options,"animationDuration") ? parseInt(options.animationDuration) : $tw.utils.getAnimationDuration(),
srcWindow = element ? element.ownerDocument.defaultView : window;
this.cancelScroll();
this.startTime = Date.now();
var scrollPosition = {
@@ -114,11 +118,11 @@ ScrollableWidget.prototype.scrollIntoView = function(element) {
}
};
ScrollableWidget.prototype.scrollSelectorIntoView = function(baseElement,selector,callback) {
ScrollableWidget.prototype.scrollSelectorIntoView = function(baseElement,selector,callback,options) {
baseElement = baseElement || document.body;
var element = baseElement.querySelector(selector);
if(element) {
this.scrollIntoView(element,callback);
this.scrollIntoView(element,callback,options);
}
};
@@ -155,8 +159,6 @@ ScrollableWidget.prototype.render = function(parent,nextSibling) {
// Create elements
this.outerDomNode = this.document.createElement("div");
$tw.utils.setStyle(this.outerDomNode,[
{overflowY: "auto"},
{overflowX: "auto"},
{webkitOverflowScrolling: "touch"}
]);
this.innerDomNode = this.document.createElement("div");

View File

@@ -314,24 +314,40 @@ excludeEventAttributes: ignores attributes whose name begins with "on"
Widget.prototype.assignAttributes = function(domNode,options) {
options = options || {};
var self = this;
$tw.utils.each(this.attributes,function(v,a) {
// Check exclusions
if(options.excludeEventAttributes && a.substr(0,2) === "on") {
v = undefined;
var assignAttribute = function(name,value) {
// Check for excluded attribute names
if(options.excludeEventAttributes && name.substr(0,2) === "on") {
value = undefined;
}
if(v !== undefined) {
var b = a.split(":");
// Setting certain attributes can cause a DOM error (eg xmlns on the svg element)
try {
if (b.length == 2 && b[0] == "xlink"){
domNode.setAttributeNS("http://www.w3.org/1999/xlink",b[1],v);
} else {
domNode.setAttributeNS(null,a,v);
if(value !== undefined) {
// Handle the xlink: namespace
var namespace = null;
if(name.substr(0,6) === "xlink:" && name.length > 6) {
namespace = "http://www.w3.org/1999/xlink";
name = name.substr(6);
}
// Handle styles
if(name.substr(0,6) === "style." && name.length > 6) {
domNode.style[$tw.utils.unHyphenateCss(name.substr(6))] = value;
} else {
// Setting certain attributes can cause a DOM error (eg xmlns on the svg element)
try {
domNode.setAttributeNS(namespace,name,value);
} catch(e) {
}
} catch(e) {
}
}
});
}
// Not all parse tree nodes have the orderedAttributes property
if(this.parseTreeNode.orderedAttributes) {
$tw.utils.each(this.parseTreeNode.orderedAttributes,function(attribute,index) {
assignAttribute(attribute.name,self.attributes[attribute.name]);
});
} else {
$tw.utils.each(Object.keys(self.attributes).sort(),function(name) {
assignAttribute(name,self.attributes[name]);
});
}
};
/*

View File

@@ -46,26 +46,31 @@ function relinkTiddler(fromTitle,toTitle,options) {
if(!tiddler.fields["plugin-type"] && type !== "application/javascript") {
var tags = tiddler.fields.tags ? tiddler.fields.tags.slice(0) : undefined,
list = tiddler.fields.list ? tiddler.fields.list.slice(0) : undefined,
isModified = false;
isModified = false,
processList = function(listField) {
if(listField && listField.indexOf(fromTitle) !== -1) {
// Remove any existing instances of the toTitle
var p = listField.indexOf(toTitle);
while(p !== -1) {
listField.splice(p,1);
p = listField.indexOf(toTitle);
}
// Replace the fromTitle with toTitle
$tw.utils.each(listField,function (title,index) {
if(title === fromTitle) {
listField[index] = toTitle;
isModified = true;
}
});
}
};
if(!options.dontRenameInTags) {
// Rename tags
$tw.utils.each(tags,function (title,index) {
if(title === fromTitle) {
console.log("Renaming tag '" + tags[index] + "' to '" + toTitle + "' of tiddler '" + tiddler.fields.title + "'");
tags[index] = toTitle;
isModified = true;
}
});
processList(tags);
}
if(!options.dontRenameInLists) {
// Rename lists
$tw.utils.each(list,function (title,index) {
if(title === fromTitle) {
console.log("Renaming list item '" + list[index] + "' to '" + toTitle + "' of tiddler '" + tiddler.fields.title + "'");
list[index] = toTitle;
isModified = true;
}
});
processList(list);
}
if(isModified) {
var newTiddler = new $tw.Tiddler(tiddler,{tags: tags, list: list},self.getModificationFields())

View File

@@ -6,7 +6,7 @@ title: $:/core/templates/tiddlywiki5.html
<head>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
<!--~~ Raw markup for the top of the head section ~~-->
`{{{ [<saveTiddlerAndShadowsFilter>tag[$:/tags/RawMarkupWikified/TopHead]] ||$:/core/templates/raw-static-tiddler}}}`
`{{{ [enlist<saveTiddlerAndShadowsFilter>tag[$:/tags/RawMarkupWikified/TopHead]] ||$:/core/templates/raw-static-tiddler}}}`
<meta http-equiv="X-UA-Compatible" content="IE=Edge"/>
<meta name="application-name" content="TiddlyWiki" />
<meta name="generator" content="TiddlyWiki" />

View File

@@ -23,7 +23,7 @@ first-search-filter: [all[shadows+tiddlers]prefix[$:/language/Docs/Types/]sort[d
<$text text={{!!group}}/>
</div>
<$set name="userInput" value={{{ [<typeInputTiddler>get[text]] }}}>
<$list filter="[all[shadows+tiddlers]prefix[$:/language/Docs/Types/]group{!!group}] +[sort[description]] +[removeprefix[$:/language/Docs/Types/]] +[search<userInput>]"><span class={{{ [<currentTiddler>addsuffix[-primaryList]] -[<typeSelectionTiddler>get[text]] +[then[]else[tc-list-item-selected]] }}}><$link to={{{ [<currentTiddler>addprefix[$:/language/Docs/Types/]get[name]] }}}><$view tiddler={{{ [<currentTiddler>addprefix[$:/language/Docs/Types/]] }}} field="description"/> (<$view tiddler={{{ [<currentTiddler>addprefix[$:/language/Docs/Types/]] }}} field="name"/>)</$link></span>
<$list filter="[all[shadows+tiddlers]prefix[$:/language/Docs/Types/]group{!!group}] +[sort[description]] +[removeprefix[$:/language/Docs/Types/]] +[search<userInput>]"><span class={{{ [<currentTiddler>addsuffix[-primaryList]] -[<typeSelectionTiddler>get[text]] +[then[]else[tc-list-item-selected]] }}}><$link to={{{ [<currentTiddler>addprefix[$:/language/Docs/Types/]get[name]] }}}><$view tiddler={{{ [<currentTiddler>addprefix[$:/language/Docs/Types/]] }}} field="description"/><$text text=" "/>(<$view tiddler={{{ [<currentTiddler>addprefix[$:/language/Docs/Types/]] }}} field="name"/>)</$link></span>
</$list>
</$set>
</$list>

View File

@@ -1,7 +1,7 @@
title: $:/snippets/allfields
\define renderfield(title)
<tr class="tc-view-field"><td class="tc-view-field-name">''$title$'':</td><td class="tc-view-field-value">//{{$:/language/Docs/Fields/$title$}}//</td></tr>
<tr class="tc-view-field"><td class="tc-view-field-name">''<$text text=<<__title__>>/>'':</td><td class="tc-view-field-value">//{{$:/language/Docs/Fields/$title$}}//</td></tr>
\end
<table class="tc-view-field-table"><tbody><$list filter="[fields[]sort[title]]" variable="listItem"><$macrocall $name="renderfield" title=<<listItem>>/></$list>
</tbody></table>

View File

@@ -1,6 +1,6 @@
title: $:/config/OfficialPluginLibrary
tags: $:/tags/PluginLibrary
url: https://tiddlywiki.com/library/v5.2.1/index.html
url: https://tiddlywiki.com/library/v5.2.2/index.html
caption: {{$:/language/OfficialPluginLibrary}}
{{$:/language/OfficialPluginLibrary/Hint}}

View File

@@ -1,7 +1,8 @@
title: $:/config/ViewTemplateBodyFilters/
tags: $:/tags/ViewTemplateBodyFilter
system: [prefix[$:/boot/]] [prefix[$:/config/]] [prefix[$:/core/]!field:title[$:/core/readme]!field:title[$:/core/icon]] [prefix[$:/info/]] [prefix[$:/language/]] [prefix[$:/languages/]] [prefix[$:/snippets/]] [prefix[$:/state/]] [prefix[$:/status/]] [prefix[$:/info/]] [prefix[$:/temp/]] +[limit[1]then[$:/core/ui/ViewTemplate/body/code]]
system: [prefix[$:/boot/]] [prefix[$:/config/]] [prefix[$:/core/macros]] [prefix[$:/core/save/]] [prefix[$:/core/templates/]] [prefix[$:/core/ui/]split[/]count[]compare:number:eq[4]] [prefix[$:/info/]] [prefix[$:/language/]] [prefix[$:/languages/]] [prefix[$:/snippets/]] [prefix[$:/state/]] [prefix[$:/status/]] [prefix[$:/info/]] [prefix[$:/temp/]] +[limit[1]then[$:/core/ui/ViewTemplate/body/code]]
code-body: [field:code-body[yes]then[$:/core/ui/ViewTemplate/body/code]]
import: [field:plugin-type[import]then[$:/core/ui/ViewTemplate/body/import]]
plugin: [has[plugin-type]then[$:/core/ui/ViewTemplate/body/plugin]]
hide-body: [field:hide-body[yes]then[$:/core/ui/ViewTemplate/body/blank]]

View File

@@ -1,3 +1,3 @@
title: $:/tags/ViewTemplateBodyFilter
list: $:/config/ViewTemplateBodyFilters/system $:/config/ViewTemplateBodyFilters/import $:/config/ViewTemplateBodyFilters/plugin $:/config/ViewTemplateBodyFilters/hide-body $:/config/ViewTemplateBodyFilters/default
list: $:/config/ViewTemplateBodyFilters/system $:/config/ViewTemplateBodyFilters/code-body $:/config/ViewTemplateBodyFilters/import $:/config/ViewTemplateBodyFilters/plugin $:/config/ViewTemplateBodyFilters/hide-body $:/config/ViewTemplateBodyFilters/default

View File

@@ -1,6 +1,6 @@
caption: 5.2.2
created: 20211208115905247
modified: 20211208115905247
created: 20220208152620527
modified: 20220208152620527
tags: ReleaseNotes
title: Release 5.2.2
type: text/vnd.tiddlywiki
@@ -17,11 +17,22 @@ type: text/vnd.tiddlywiki
! Bug Fixes
*
* <<.link-badge-fixed "https://github.com/Jermolene/TiddlyWiki5/commit/60187dc59e6546d9ca8e6a35418f782a9627cda0">> importing/upgrading encrypted single file wikis
* <<.link-badge-fixed "https://github.com/Jermolene/TiddlyWiki5/issues/6389">> RadioWidget not using default value if the field or index is missing
* <<.link-badge-fixed "https://github.com/Jermolene/TiddlyWiki5/issues/6376">> [[WidgetMessage: tm-edit-text-operation]] crash with ''wrap-lines'' operation if prefix or suffix is missing
* <<.link-badge-fixed "https://github.com/Jermolene/TiddlyWiki5/issues/6395">> processing of $:/tags/RawMarkupWikified/TopHead tiddlers
* <<.link-badge-fixed "https://github.com/Jermolene/TiddlyWiki5/issues/6398">> issue whereby renaming tags could result in duplicate tags
* <<.link-badge-fixed "https://github.com/Jermolene/TiddlyWiki5/issues/6426">> issue with ImportVariablesWidget when importing block mode widgets
* <<.link-badge-fixed "https://github.com/Jermolene/TiddlyWiki5/pull/6428">> issue with ~LaTeX content within Markdown tiddlers
* <<.link-badge-fixed "https://github.com/Jermolene/TiddlyWiki5/issues/6440">> search results obscured on narrow screens
* <<.link-badge-fixed "https://github.com/Jermolene/TiddlyWiki5/pull/6438">> crash when using deprecated regexp operands for filter operators
! Usability Improvements
*
* <<.link-badge-improved "https://github.com/Jermolene/TiddlyWiki5/pull/6435">> wording of drag and drop banner (from "drop here" to "drop now")
* <<.link-badge-fixed "https://github.com/Jermolene/TiddlyWiki5/commit/853a899c77766e47eade1dfa5822640ef9915637">> wrapping and wikification of field names in field viewer
* <<.link-badge-fixed "https://github.com/Jermolene/TiddlyWiki5/commit/0186c6490fbd1d8fd4de7c3fa99ccf4d129fbd80">> missing whitespace between description and MIME type in edit template dropdown for the ''type'' field
* <<.link-badge-fixed "https://github.com/Jermolene/TiddlyWiki5/commit/c7e8c87f85b54f60302ff8e396a7569d996e3f67">> incorrect usage of code view for certain system tiddlers
! Widget Improvements
@@ -33,11 +44,18 @@ type: text/vnd.tiddlywiki
! Hackability Improvements
*
* <<.link-badge-added "https://github.com/Jermolene/TiddlyWiki5/commit/54cfda76ee353190f1cf0210b9071894fb1a5690">> support for ''code-body'' field set to ''yes'' to trigger display of a tiddler in the code view
* <<.link-badge-added "https://github.com/Jermolene/TiddlyWiki5/commit/66ae1d6930796a9eb062fdb64a755adab8f39294">> classes to the ImageWidget to indicate whether it is loading, loaded or has encountered an error
* <<.link-badge-added "https://github.com/Jermolene/TiddlyWiki5/pull/6381">> sourceURL tags to $:/boot/boot.js and $:/boot/bootprefix.js, enabling them to be accessed in the browser debugger more easily
* <<.link-badge-added "https://github.com/Jermolene/TiddlyWiki5/pull/6410">> support to [[WidgetMessage: tm-scroll]] for scrolling without animating
* <<.link-badge-added "https://github.com/Jermolene/TiddlyWiki5/commit/1a0c831216c397c6fef8e5685e47857193411a1b">> [[sha256 Operator]]
! Developer Improvements
*
* <<.link-badge-added "https://github.com/Jermolene/TiddlyWiki5/pull/6409">> support for ''renderEnd()'' method for storyviews
! Node.js Improvements
@@ -45,7 +63,7 @@ type: text/vnd.tiddlywiki
! Translation improvements
*
* Polish
! Acknowledgements

View File

@@ -1,6 +1,6 @@
title: $:/config/OfficialPluginLibrary
tags: $:/tags/PluginLibrary
url: https://tiddlywiki.com/prerelease/library/v5.2.1/index.html
url: https://tiddlywiki.com/prerelease/library/v5.2.2/index.html
caption: {{$:/language/OfficialPluginLibrary}} (Prerelease)
The prerelease version of the official ~TiddlyWiki plugin library at tiddlywiki.com. Plugins, themes and language packs are maintained by the core team.

View File

@@ -1,4 +1,5 @@
title: $:/editions/tw5.com/download-empty
code-body: yes
\define saveTiddlerFilter()
[[$:/core]] [[$:/isEncrypted]] [[$:/themes/tiddlywiki/snowwhite]] [[$:/themes/tiddlywiki/vanilla]] -[[$:/boot/boot.css]] -[type[application/javascript]library[yes]] -[[$:/boot/boot.js]] -[[$:/boot/bootprefix.js]] [[$:/config/OfficialPluginLibrary]] +[sort[title]]

View File

@@ -256,6 +256,16 @@ Tests the filtering mechanism.
expect(wiki.filterTiddlers("[modifier/Jo/]").join(",")).toBe("TiddlerOne,$:/TiddlerTwo,Tiddler Three,a fourth tiddler,one");
expect(console.log).toHaveBeenCalledWith("WARNING: Filter", "modifier", "has a deprecated regexp operand", /Jo/);
});
it("should handle regular expression operands without crashing", function() {
spyOn(console, 'log');
// We don't really care about the results. Just don't get RSoD.
expect(() => wiki.filterTiddlers("[all/current/]")).not.toThrow();
expect(() => wiki.filterTiddlers("[prefix/anything/]")).not.toThrow();
expect(() => wiki.filterTiddlers("[title/anything/]")).not.toThrow();
expect(() => wiki.filterTiddlers("[/anything/]")).not.toThrow();
expect(() => wiki.filterTiddlers("[//]")).not.toThrow();
});
it("should handle the prefix operator", function() {
expect(wiki.filterTiddlers("[prefix[Tiddler]]").join(",")).toBe("TiddlerOne,Tiddler Three");

View File

@@ -1,28 +1,31 @@
created: 20140721121924384
modified: 20201222114755959
modified: 20220131165124489
tags: Community
title: Forums
type: text/vnd.tiddlywiki
! Users
! Official Forums
The ~TiddlyWiki discussion groups are mailing lists for talking about ~TiddlyWiki: requests for help, announcements of new releases and plugins, debating new features, or just sharing experiences. You can participate via the associated website, or subscribe via email.
The new official forum for talking about ~TiddlyWiki: requests for help, announcements of new releases and plugins, debating new features, or just sharing experiences. You can participate via the associated website, or subscribe via email.
* The main ~TiddlyWiki group: https://groups.google.com/group/TiddlyWiki
*> Note that you do not need a Google Account to join the discussion groups. Subscribe by sending an email to mailto:tiddlywiki+subscribe@googlegroups.com.
** An enhanced group search facility is available on [[mail-archive.com|https://www.mail-archive.com/tiddlywiki@googlegroups.com/]]
* Watch recordings of our regular [[TiddlyWiki Hangouts]]
* Follow [[@TiddlyWiki on Twitter|http://twitter.com/TiddlyWiki]] for the latest news
* New: Join us on our live chat at https://gitter.im/TiddlyWiki/public !
* There is also a discord available at https://discord.gg/HFFZVQ8
https://talk.tiddlywiki.org/
Note that talk.tiddlywiki.org is a community run service that we host and maintain ourselves. The modest running costs are covered by community contributions.
! Developers
For the convenience of existing users, we also continue to operate the original ~TiddlyWiki group (hosted on Google Groups since 2005):
https://groups.google.com/group/TiddlyWiki
! Developer Forums
{{Developers}}
New releases of TiddlyWiki, TiddlyDesktop and TiddlyFox are announced via the discussion groups and [[Twitter|https://twitter.com/TiddlyWiki]] (you can also subscribe to an Atom/RSS feed of [[TiddlyWiki releases from GitHub|https://github.com/jermolene/tiddlywiki5/releases.atom]])
! Other Forums
! Documentation
* [[TiddlyWiki Subreddit|https://www.reddit.com/r/TiddlyWiki5/]]
* Chat with Gitter at https://gitter.im/TiddlyWiki/public !
* Chat on Discord at https://discord.gg/HFFZVQ8
!! Documentation
There is also a discussion group specifically for discussing TiddlyWiki documentation improvement initiatives: https://groups.google.com/group/tiddlywikidocs

View File

@@ -1,5 +1,5 @@
created: 20140211171341271
modified: 20200103092706002
modified: 20220128112317724
tags: Concepts Reference
title: Macros
type: text/vnd.tiddlywiki
@@ -14,8 +14,6 @@ They are created using the `\define` [[pragma|Pragma]]. (Behind the scenes, this
The snippet and its incoming parameter values are treated as simple strings of characters with no WikiText meaning, at least until the placeholders have been filled in and the macro call has returned. This means that a macro can assemble and return the complete syntax of a ~WikiText component, such as a [[link|Linking in WikiText]]. (See [[Transclusion and Substitution]] for further discussion of this.)
The string returned by a macro call is parsed separately from any surrounding ~WikiText components. So a safe way to insert a special character sequence (such as `[[` or `<`) without triggering its normal ~WikiText meaning is to wrap it in a macro.
Within a snippet itself, the only markup detected is `$name$` (a placeholder for a macro parameter) and `$(name)$` (a placeholder for a [[variable|Variables]]).
The <<.mlink dumpvariables>> macro lists all variables (including macros) that are available at that position in the widget tree.

View File

@@ -1,6 +1,6 @@
created: 20150219175930000
modified: 20180928145730028
tags: Concepts
modified: 20220122182842041
tags: Concepts [[WikiText Parser Modes]]
title: Pragma
type: text/vnd.tiddlywiki

View File

@@ -1,5 +1,5 @@
created: 20130825213300000
modified: 20191206152031468
modified: 20220109101407050
tags: Concepts
title: TiddlerFields
type: text/vnd.tiddlywiki
@@ -25,6 +25,7 @@ Other fields used by the core are:
|!Field Name |!Description |
|`class` |<<lingo class>> |
|`code-body` |<<.from-version "5.2.1">> <<lingo code-body>> |
|`color` |<<lingo color>> |
|`description` |<<lingo description>> |
|`draft.of` |<<lingo draft.of>> |

View File

@@ -1,5 +1,6 @@
title: $:/_tw5.com/CustomStoryTiddlerTemplateDemo/Styles
tags: $:/tags/Stylesheet
code-body: yes
.tc-custom-tiddler-template {
border: 3px solid <<colour muted-foreground>>;

View File

@@ -1,4 +1,5 @@
title: $:/_tw5.com/CustomStoryTiddlerTemplateDemo/Template
code-body: yes
\define list-item-styles()
transform: translate($(left)$%,$(top)$%) scale(0.3) rotate($(angle)$deg);

View File

@@ -1,5 +1,6 @@
title: $:/_tw5.com/CustomStoryTiddlerTemplateDemo/Filter
tags: $:/tags/StoryTiddlerTemplateFilter
list-before: $:/config/StoryTiddlerTemplateFilters/default
code-body: yes
[tag[$:/tags/TiddlerList]then[$:/_tw5.com/CustomStoryTiddlerTemplateDemo/Template]]

View File

@@ -22,5 +22,5 @@ Most files are imported as individual tiddlers. The exceptions are:
!! Importing content from other ~TiddlyWiki browser windows
Tiddlers can be imported from other ~TiddlyWiki browser windows via [[Drag and Drop]]. Drag a tiddler link or tag from one ~TiddlyWiki browser window to another. Dragging a link will import a single tiddler while dragging a tag pill will import all of the tiddlers that carry that tag.
Tiddlers can be imported from other ~TiddlyWiki browser windows via [[Drag and Drop]]. Drag a TiddlyWiki internal link or a tag from one ~TiddlyWiki browser window to another. Dragging an internal link will import a single tiddler while dragging a tag pill will import all of the tiddlers that carry that tag.

View File

@@ -1,5 +1,5 @@
created: 20160107225427489
modified: 20201117081054556
modified: 20211221102625141
tags: Features
title: Modals
type: text/vnd.tiddlywiki
@@ -12,6 +12,7 @@ The tiddler to be displayed can contain the following optional fields that are u
|footer|The footer text for the modal|
|subtitle|The subtitle text for a modal, displayed in a `h3` html tag|
|class|An additional class to apply to the modal wrapper|
|help|An optional external link that will be displayed at the left of the footer with the text "Help"|
Note that the footer and subtitle fields are not limited to plain text, and wiki text features such as widgets and transclusions can be used as well.

View File

@@ -1,5 +1,5 @@
created: 20140410103123179
modified: 20210830010231559
modified: 20211217141224284
tags: Filters
title: Filter Operators
type: text/vnd.tiddlywiki
@@ -10,18 +10,21 @@ type: text/vnd.tiddlywiki
<td>{{!!op-purpose}}</td>
<td align="center"><$list filter="[all[current]tag[Common Operators]]">✓</$list></td>
<td align="center"><$list filter="[all[current]tag[Negatable Operators]]">`!`</$list></td>
<td align="center"><$list filter="[all[current]tag[Selection Constructors]!tag[Selection Constructors: Conditional]]">`C`</$list><$list filter="[all[current]tag[Selection Constructors]tag[Selection Constructors: Conditional]]">`C?`</$list></td>
</tr></$list>
\end
\define .group-heading(_)
<tr class="doc-table-subheading"><th colspan="4" align="center">$_$</th></tr>
<tr class="doc-table-subheading"><th colspan="5" align="center">$_$</th></tr>
\end
A <<.def "filter operator">> is a predefined keyword attached to an individual [[step|Filter Step]] of a [[filter|Filters]]. It defines the particular action of that step.
''Important:'' Each first [[step|Filter Step]] of a [[filter run|Filter Run]] not given any input titles receives the output of <$link to="all Operator">[all[tiddlers]]</$link> as its input.
The following table lists all core operators, the most common ones marked ✓. The last column indicates whether an operator allows ''negation'' using the <$link to="Filter Step"><code>!</code> prefix</$link>. For specifics as to each operator's negated output please refer to its documentation.
The following table lists all core operators, the most common ones marked ✓. The `!` column indicates whether an operator allows ''negation'' using the <$link to="Filter Step"><code>!</code> prefix</$link>. For specifics as to each operator's negated output please refer to its documentation.
Most steps process the [[selection of titles|Title Selection]] that are supplied as their input, but a few [[construct an entirely new selection|Selection Constructors]] instead, as indicated by the last column. A `C?` indicates it might construct a new selection, depending on usage. For specifics as to each operator's selection creation please refer to its documentation.
<table>
<tr>
@@ -29,6 +32,7 @@ The following table lists all core operators, the most common ones marked ✓. T
<th align="left">Purpose</th>
<th align="center">✓</th>
<th align="center">`!`</th>
<th align="center">`C`</th>
</tr>
<<.operator-rows "[tag[Filter Operators]!tag[Order Operators]!tag[Mathematics Operators]!tag[String Operators]!tag[Tag Operators]!tag[Special Operators]sort[]]">>
<<.group-heading "Order Operators">>
@@ -45,6 +49,6 @@ The following table lists all core operators, the most common ones marked ✓. T
<<.operator-rows "[tag[Filter Operators]!tag[Order Operators]!tag[Mathematics Operators]!tag[String Operators]!tag[Tag Operators]tag[Special Operators]sort[]]">>
</table>
A typical step is written as `[operator[parameter]]`, although not all of the operators need a [[parameter|Filter Parameter]].
A typical step is written as `[operator[parameter]]`, although not all of the operators need a [[parameter|Filter Parameter]].
Most steps process the [[selection of titles|Title Selection]] that are supplied as their input, but a few [[construct an entirely new selection|Selection Constructors]] instead. For the exact rules, see [[Filter Syntax]].
For the exact rules, see [[Filter Syntax]].

View File

@@ -1,11 +1,11 @@
caption: all
created: 20140410103123179
modified: 20161128185445034
modified: 20211217135719266
op-input: ignored, unless the parameter is empty
op-output: the titles that belong to all the specified categories
op-parameter: zero or more categories
op-purpose: find all titles of a fundamental category
tags: [[Filter Operators]] [[Common Operators]] [[Selection Constructors]]
tags: [[Filter Operators]] [[Common Operators]] [[Selection Constructors]] [[Selection Constructors: Conditional]]
title: all Operator
type: text/vnd.tiddlywiki

View File

@@ -0,0 +1,18 @@
caption: sha256
created: 20220129105504961
modified: 20220129105504961
op-input: a [[selection of titles|Title Selection]]
op-output: the base64 encoded sha256 of the input, truncated to the specified length
op-parameter: the number of characters to return, up to a maximum of 64
op-parameter-name: L
op-purpose: apply sha256 hash to a string
tags: [[Filter Operators]] [[String Operators]]
title: sha256 Operator
type: text/vnd.tiddlywiki
from-version: 5.1.14
Hashes are a way of turning strings of arbitrary length into obfuscated strings of fixed length. They are often used in situations where items need to be stored by name but it is inconvenient to allow arbitrary length strings.
See Wikipedia for details of the [[sha256|https://en.wikipedia.org/wiki/SHA-2]] operation.
<<.operator-examples "sha256">>

View File

@@ -1,6 +1,6 @@
caption: subfilter
created: 20181031175129475
modified: 20211030223407188
modified: 20211217135706478
op-input: a [[selection of titles|Title Selection]] passed as input to the subfilter
op-neg-input: a [[selection of titles|Title Selection]] passed as input to the subfilter
op-neg-output: those input titles that are <<.em not>> returned from the subfilter <<.place S>>
@@ -8,7 +8,7 @@ op-output: the [[selection of titles|Title Selection]] returned from the subfilt
op-parameter: a [[filter expression|Filter Expression]]
op-parameter-name: S
op-purpose: select titles from the operand interpreted as a [[filter expression|Filter Expression]]
tags: [[Filter Operators]] [[Field Operators]] [[Selection Constructors]] [[Negatable Operators]]
tags: [[Filter Operators]] [[Field Operators]] [[Selection Constructors]] [[Negatable Operators]] [[Selection Constructors: Conditional]]
title: subfilter Operator
type: text/vnd.tiddlywiki

View File

@@ -10,11 +10,11 @@ type: text/vnd.tiddlywiki
|''input'' |all titles from previous filter runs |
|''output''|the input titles as modified by the filters returned by this filter run |
The filter expression for this filter run is evaluated to return a list of filters. Each input title is then evaluated against each of the filters in turn, and the input title is replaced with the first result of the first filter that returns a non-empty list. If none of the filters return a result for an input title, it is replaced with an empty string.
The [[filter expression|Filter Expression]] for this [[filter run|Filter Run]] is evaluated to return a list of filters. Each input title is then evaluated against each of the filters in turn, and the input title is replaced with the first result of the first filter that returns a non-empty list. If none of the filters return a result for an input title, it is replaced with an empty string.
The following variables are available within the filter run:
* <<.var currentTiddler>> - the input title
* <<.var ..currentTiddler>> - the value of the variable `currentTiddler` outside the filter run.
[[Examples|Cascade Filter Run Prefix (Examples)]]
[[Examples|Cascade Filter Run Prefix (Examples)]]

View File

@@ -1,6 +1,6 @@
created: 20130822170200000
list: [[A Gentle Guide to TiddlyWiki]] [[Discover TiddlyWiki]] [[Some of the things you can do with TiddlyWiki]] [[Ten reasons to switch to TiddlyWiki]] Examples [[What happened to the original TiddlyWiki?]] [[HelloThumbnail - TWEUM2017]]
modified: 20211208115833846
modified: 20220131164555580
tags: TableOfContents
title: HelloThere
type: text/vnd.tiddlywiki
@@ -18,8 +18,8 @@ Use it to keep your [[to-do list|TaskManagementExample]], to plan an [[essay or
Unlike conventional online services, TiddlyWiki lets you choose where to keep your data, guaranteeing that in the decades to come you will [[still be able to use|Future Proof]] the notes you take today.
<div style="font-size:0.7em;text-align:center;margin:3em auto;">
<a href="https://groups.google.com/group/TiddlyWiki" class="tc-btn-big-green" style="border-radius:4px;background-color:#FF8C19;" target="_blank" rel="noopener noreferrer">
{{$:/core/images/help}} Forum
<a href="https://talk.tiddlywiki.org/" class="tc-btn-big-green" style="border-radius:4px;background-color:#FF8C19;" target="_blank" rel="noopener noreferrer">
{{$:/core/images/help}} ~TalkTW
</a>
<a href="https://www.youtube.com/c/JeremyRuston" class="tc-btn-big-green" style="border-radius:4px;background-color:#e52d27;" target="_blank" rel="noopener noreferrer">
{{$:/core/images/video}} ~YouTube

View File

@@ -1,5 +1,5 @@
created: 20160424150551727
modified: 20190115162340362
modified: 20211230153027382
tags: Learning
title: Concatenating text and variables using macro substitution
type: text/vnd.tiddlywiki
@@ -9,9 +9,7 @@ It's a frequent use case in ~TiddlyWiki that you will want to put the results of
You might, for instance want to set up a template for your customer database, where links will automatically refer to additional contact information about your customer. Inside your tiddler, you might try something like this:
|warning|k
|@@font-size:1.5em;&#9888;@@ Warning:<br/> Don't do it this way!| `[[Additional Info|<<currentTiddler>>-Contact]]` |
<<.bad-example "`[[Additional Info|<<currentTiddler>>-Contact]]`">>
But that won't work. If you try this, the link will be interpreted very literally, and will attempt to take you to:
@@ -29,9 +27,7 @@ Create a macro at the top of the tiddler like this:
You might be tempted to invoke the new macro like this:
|warning|k
|@@font-size:1.5em;&#9888;@@ Warning:<br/> Don't do it this way!| `<<linkup <<currentTiddler>> >>` |
<<.bad-example "`<<linkup <<currentTiddler>> >>`">>
But if you do, you will find that `<<currentTiddler>>` doesn't get rendered, but instead gets passed literally.
@@ -53,10 +49,4 @@ Notice that in this case we don't pass an argument. Instead, we reference the va
```
<<linkup>>
```
<style>
.warning code {background-color:#ffff80}
table.warning {background-color:#ffff80;}
</style>
```

Binary file not shown.

Before

Width:  |  Height:  |  Size: 41 KiB

After

Width:  |  Height:  |  Size: 144 KiB

View File

@@ -1,6 +1,6 @@
caption: list-links-draggable
created: 20170328204925306
modified: 20170329093008550
modified: 20211214141650488
tags: Macros [[Core Macros]]
title: list-links-draggable Macro
type: text/vnd.tiddlywiki

View File

@@ -1,5 +1,5 @@
created: 20140811112201235
modified: 20141110133723696
modified: 20220123141646321
tags: Messages
title: WidgetMessage: tm-download-file
type: text/vnd.tiddlywiki
@@ -11,6 +11,11 @@ The download file message causes the current saver module to prompt the user to
|param |Title of a tiddler to use as a template for the new tiddler |
|paramObject |Optional hashmap of variable values to use for the rendering |
The following variable names have special behaviour:
|!Name |!Description |
|filename |Filename for the downloaded file (note that this is a hint to the browser, and the actual filename used may be different) |
The download file message is usually generated with the ButtonWidget.
The download file message is handled by the TiddlyWiki core SyncMechanism which invokes the current [[SaverModule|SaverModules]].

View File

@@ -0,0 +1,26 @@
caption: tm-relink-tiddler
created: 20220219093748993
modified: 20220219093748993
tags: Messages navigator-message
title: WidgetMessage: tm-relink-tiddler
type: text/vnd.tiddlywiki
<<.from-version "5.2.2">> The `tm-relink-tiddler` message relinks a tiddler by deleting it and recreating it with a new title. Unlike the [[WidgetMessage: tm-rename-tiddler]] message, this message does not rename the tiddler, it just relinks the references to it.
The relink tiddler message requires the following properties on the `event` object:
|!Name |!Description |
|from |Current title of tiddler |
|to |New title of tiddler |
|renameInTags |Optional value "no" to disable renaming in tags fields of other tiddlers (defaults to "yes") |
|renameInLists |Optional value "no" to disable renaming in list fields of other tiddlers (defaults to "yes") |
The relink tiddler message is usually generated with the ButtonWidget and is handled by the core.
! Examples
To relink Tiddler1 to Tiddler2 in tags and list fields of other tiddlers:
```
<$action-sendmessage $message="tm-relink-tiddler" from="Tiddler1" to="Tiddler2" />
```

View File

@@ -1,6 +1,6 @@
caption: tm-rename-tiddler
created: 20190909133618113
modified: 20190909133618113
modified: 20220219093748993
tags: Messages navigator-message
title: WidgetMessage: tm-rename-tiddler
type: text/vnd.tiddlywiki
@@ -13,7 +13,9 @@ The `tm-rename-tiddler` message renames a tiddler by deleting it and recreating
|renameInTags |<<.from-version "5.1.23">> Optional value "no" to disable renaming in tags fields of other tiddlers (defaults to "yes") |
|renameInLists |<<.from-version "5.1.23">> Optional value "no" to disable renaming in list fields of other tiddlers (defaults to "yes") |
The rename tiddler message is usually generated with the ButtonWidget and is handled by the NavigatorWidget.
The very similar [[WidgetMessage: tm-relink-tiddler]] message does not rename the tiddler, it just relinks the references to it.
The rename tiddler message is usually generated with the ButtonWidget and is handled by the core.
! Examples

View File

@@ -10,3 +10,6 @@ The `tm-scroll` message causes the surrounding scrollable container to scroll to
|!Name |!Description |
|target |Target DOM node the scrollable container should scroll to (note that this parameter can only be set via JavaScript code) |
|selector |<<.from-version "5.1.23">> Optional string [[CSS selector|https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Selectors]] as an alternate means of identifying the target DOM node |
|animationDuration |<<.from-version "5.2.2">> Optional number specifying the animation duration in milliseconds for the scrolling. Defaults to the [[global animation duration|$:/config/AnimationDuration]]. |
<<.tip "Set `animationDuration` to `0` to scroll without animation">>

View File

@@ -8,6 +8,12 @@ type: text/vnd.tiddlywiki
//[[See GitHub for detailed change history of this release|https://github.com/Jermolene/TiddlyWiki5/compare/v5.1.20...v5.1.21]]//
<<.banner-credits
credit:"""Congratulations to [[Sylvain Comte|https://github.com/sycom]] for his winning design for the banner for this release (here are the [[other entries|https://groups.google.com/g/tiddlywiki/c/l47ZZzWdDb8/m/a1dnyKG0AQAJ]]).
"""
url:"https://raw.githubusercontent.com/Jermolene/TiddlyWiki5/42060acb43b329036b7436ee154bf605e90efa8e/editions/tw5.com/tiddlers/images/New%20Release%20Banner.jpg"
>>
This is a bug fix release that resolves issues introduced in the recent [[Release 5.1.20]].
!! Bug Fixes

View File

@@ -8,6 +8,12 @@ type: text/vnd.tiddlywiki
//[[See GitHub for detailed change history of this release|https://github.com/Jermolene/TiddlyWiki5/compare/v5.1.21...v5.1.22]]//
<<.banner-credits
credit:"""Congratulations to [[Thomas Elmiger|https://github.com/telmiger]] for his winning design for the banner for this release (here are the [[other entries|https://groups.google.com/g/tiddlywiki/c/rYrja18_SfQ/m/IX-jFS4cBQAJ]]).
"""
url:"https://raw.githubusercontent.com/Jermolene/TiddlyWiki5/1ed36adab62c117849ee29d9535136eac70d3bc7/editions/tw5.com/tiddlers/images/New%20Release%20Banner.png"
>>
! Major Improvements
!! Dynamic Plugin Loading

View File

@@ -12,6 +12,12 @@ type: text/vnd.tiddlywiki
//[[See GitHub for detailed change history of this release|https://github.com/Jermolene/TiddlyWiki5/compare/v5.1.22...v5.1.23]]//
<<.banner-credits
credit:"""Congratulations to [[Atronoush|https://github.com/atronoush]] for his winning design for the banner for this release (here are the [[other entries|https://groups.google.com/g/tiddlywiki/c/cTgPWl8b_9c/m/RghSSNKXAQAJ]]).
"""
url:"https://raw.githubusercontent.com/Jermolene/TiddlyWiki5/3c003364d2408eb27912187f57f023333cc4f4dd/editions/tw5.com/tiddlers/images/New%20Release%20Banner.png"
>>
! Performance Improvements
* <<.link-badge-improved "https://github.com/Jermolene/TiddlyWiki5/pull/5206">> filter execution to use a more efficient linked list structure for intermediate results

View File

@@ -12,6 +12,12 @@ type: text/vnd.tiddlywiki
//[[See GitHub for detailed change history of this release|https://github.com/Jermolene/TiddlyWiki5/compare/v5.1.23...v5.2.0]]//
<<.banner-credits
credit:"""Congratulations to Frank. B for his winning design for the banner for this release (here are the [[other entries|https://groups.google.com/g/tiddlywiki/c/eccIEHZoxsI/m/_MWs3EooBAAJ]]).
"""
url:"https://raw.githubusercontent.com/Jermolene/TiddlyWiki5/32b36fb2aff6bbe4f9281ee56d5bf6b8bbe5454b/editions/tw5.com/tiddlers/images/New%20Release%20Banner.png"
>>
! Highlights
!! Unrestricted Fieldnames and the New JSON Store Area

View File

@@ -12,6 +12,12 @@ type: text/vnd.tiddlywiki
//[[See GitHub for detailed change history of this release|https://github.com/Jermolene/TiddlyWiki5/compare/v5.2.0...v5.2.1]]//
<<.banner-credits
credit:"""Congratulations to [[Mohammad Rahmani|https://github.com/kookma]] and [[Elise Springer|https://www.wesleyan.edu/academics/faculty/espringer/profile.html]] for their winning design for the banner for this release (here are the [[other entries|https://groups.google.com/g/tiddlywiki/c/GU0TPGNMPvw/m/y1SyQk_nAQAJ]]).
"""
url:"https://raw.githubusercontent.com/Jermolene/TiddlyWiki5/cb43b91ab6b14c2a16af917cfab0e5b2371502c6/editions/tw5.com/tiddlers/images/New%20Release%20Banner.png"
>>
! Highlights
!! <<.link-badge-added "https://github.com/Jermolene/TiddlyWiki5/pull/6168">> New Filter Cascade Mechanism

View File

@@ -1,7 +1,9 @@
created: 20150419144523070
modified: 20150420114530386
modified: 20220131165321472
tags: About
title: Releases
type: text/vnd.tiddlywiki
<<tabs "[[TiddlyWiki Releases]] [[TiddlyDesktop Releases]]" "TiddlyWiki Releases" "$:/state/tab">>
New releases of TiddlyWiki, TiddlyDesktop and TiddlyFox are announced via the [[official discussion groups|Forums]] and [[Twitter|https://twitter.com/TiddlyWiki]] (you can also subscribe to an Atom/RSS feed of [[TiddlyWiki releases from GitHub|https://github.com/jermolene/tiddlywiki5/releases.atom]])
<<tabs "[[TiddlyWiki Releases]] [[TiddlyDesktop Releases]]" "TiddlyWiki Releases" "$:/state/tab">>

View File

@@ -1,5 +1,5 @@
created: 20150117152607000
modified: 201804111739
modified: 20211230150413997
tags: $:/tags/Macro
title: $:/editions/tw5.com/doc-macros
type: text/vnd.tiddlywiki
@@ -113,6 +113,20 @@ This is an example tiddler. See [[Table-of-Contents Macros (Examples)]].
</$list>
\end
\define .bad-example(eg)
<table class="doc-bad-example">
<tbody>
<tr class="evenRow">
<td><span class="tc-inline-style" style="font-size:1.5em;">&#9888;</span> Warning:<br> Don't do it this way!</td>
<td>
$eg$
</td>
</tr>
</tbody>
</table>
\end
\define .link-badge(text,link,colour)
<a href=<<__link__>> class="doc-link-badge" style="background-color:$colour$;" target="_blank" rel="noopener noreferrer"><$text text=<<__text__>>/></a>
\end
@@ -147,4 +161,14 @@ This is an example tiddler. See [[Table-of-Contents Macros (Examples)]].
</$tiddler>
\end
\define .banner-credits(credit,url)
<img src=<<__url__>> width="140" style="float:left;margin-right:0.5em;"/>
$credit$
<div style="clear:both;">
</div>
\end
<pre><$view field="text"/></pre>

View File

@@ -1,5 +1,5 @@
created: 20150117152612000
modified: 20211124164948726
modified: 20211230150725145
tags: $:/tags/Stylesheet
title: $:/editions/tw5.com/doc-styles
type: text/vnd.tiddlywiki
@@ -133,6 +133,10 @@ td svg {
padding-left: 20px;
}
.doc-bad-example code, .doc-bad-example pre, table.doc-bad-example {
background-color:#ffff80;
}
.doc-table th, .doc-table tr {
vertical-align: top;
}

View File

@@ -1,4 +1,5 @@
title: $:/editions/tw5.com/download-empty
code-body: yes
\define saveTiddlerFilter()
[[$:/core]] [[$:/isEncrypted]] [[$:/themes/tiddlywiki/snowwhite]] [[$:/themes/tiddlywiki/vanilla]] -[[$:/boot/boot.css]] -[type[application/javascript]library[yes]] -[[$:/boot/boot.js]] -[[$:/boot/bootprefix.js]] +[sort[title]]

View File

@@ -1,7 +1,8 @@
created: 20150117184156000
modified: 20150117184616000
title: $:/editions/tw5.com/wikitext-macros
modified: 20220122143551571
tags: $:/tags/Macro
title: $:/editions/tw5.com/wikitext-macros
type: text/vnd.tiddlywiki
\define wikitext-example(src)
<div class="doc-example">
@@ -43,6 +44,17 @@ $$$
</div>
\end
\define wikitext-example-table-header() <thead><tr><th/><th>wiki text</th><th>renders as</th></tr></thead>
\define wikitext-example-table-row(id, code)
<tr>
<th><<__id__>></th><td><$codeblock code=<<__code__>>/></td><td>
<<__code__>>
</td>
</tr>
\end
\define tw-code(tiddler)
<$codeblock language={{$tiddler$!!type}} code={{$tiddler$}}/>
\end

View File

@@ -0,0 +1,14 @@
created: 20220125161941555
modified: 20220125162920771
tags: [[Widget Examples]]
title: $:/editions/tw5.com/widget-examples/qualify-transcluded
type: text/vnd.tiddlywiki
<$macrocall $name=".example" n="1"
eg="""<$qualify title="BaseTiddler" name="iamnotanumber">
<ul>
<li><code><<iamnotanumber>></code></li>
<li><code><<transclusion>></code></li>
</ul>
</$qualify>
"""/>

View File

@@ -28,7 +28,7 @@ The content of the `<$edit-text>` widget is ignored.
|autocomplete |<<.from-version 5.1.23>> An optional string to provide a hint to the browser how to handle autocomplete for this input |
|tag |Overrides the generated HTML editing element tag. For a multi-line editor use `tag=textarea`. For a single-line editor use `tag=input` |
|type |Overrides the generated HTML editing element `type` attribute |
|size |The size of the input field (in characters) |
|size |The size of the input field (in characters). This exact result depends on browser and font. Use the `class` attribute to style width for precise control |
|autoHeight |Either "yes" or "no" to specify whether to automatically resize `textarea` editors to fit their content (defaults to "yes") |
|minHeight |Minimum height for automatically resized `textarea` editors, specified in CSS length units such as "px", "em" or "%" |
|rows|Sets the rows attribute of a generated textarea |

View File

@@ -25,7 +25,6 @@ Use of the event catcher widget is beneficial when using large numbers of other
The content of the `<$eventcatcher>` widget is displayed normally.
|!Attribute |!Description |
|selector |A CSS selector. Only events originating inside a DOM node with this selector will be trapped |
|//{any attributes starting with $}// |<<.from-version "5.2.0">> Each attribute name (excluding the $) specifies the name of an event, and the value specifies the action string to be invoked. For example: `$click=<<clickActions>>` |
|tag |Optional. The HTML element the widget creates to capture the events, defaults to:<br>» `span` when parsed in inline-mode<br>» `div` when parsed in block-mode |

View File

@@ -1,6 +1,6 @@
title: ImageWidget
created: 20140416160234142
modified: 20140820100234142
modified: 20220101205921813
tags: Widgets
caption: image
@@ -22,6 +22,14 @@ Any content of the `<$image>` widget is ignored.
The width and the height can be specified as pixel values (eg "23" or "23px") or percentages (eg "23%"). They are both optional; if not provided the browser will use CSS rules to size the image.
! Image Status Classes
<<from-version "5.2.2">> The following CSS classes are automatically added to the `<img>` element to indicate the status of the image. Note that only one of these classes will be added at the same time.
|''tc-image-loading'' |When the image is being loaded |
|''tc-image-loaded'' |The image has been loaded successfully |
|''tc-image-error'' |The image could not be loaded |
! External Images and the ''_canonical_uri'' field
When used to display tiddler-based images, the image widget operates in two distinct modes:

View File

@@ -1,6 +1,6 @@
caption: macrocall
created: 20131024141900000
modified: 20200928102843275
modified: 20220122193731433
tags: Widgets
title: MacroCallWidget
type: text/vnd.tiddlywiki
@@ -38,6 +38,8 @@ You can see several examples of the macro call widget within the core:
* Listing field information: [[$:/snippets/allfields]]
* Generating `data:` URIs: [[$:/themes/tiddlywiki/starlight/styles.tid]]
See also [[WikiText parser mode: macro examples]]
! Content and Attributes
The content of the `<$macrocall>` widget is ignored.

View File

@@ -1,5 +1,5 @@
created: 20210309133636211
modified: 20211009122821123
modified: 20211222153049771
tags: Widgets MessageHandlerWidgets TriggeringWidgets
title: MessageCatcherWidget
type: text/vnd.tiddlywiki
@@ -37,7 +37,7 @@ The message catcher widget sets the following variables within each action strin
<$action-log/>
\end
<$messagecatcher type="tm-navigate" actions=<<actions>>>
<$messagecatcher $tm-navigate=<<actions>>>
Click on [[this link]] to fire an action. See the browser JavaScript console for the output

View File

@@ -0,0 +1,39 @@
caption: vars
created: 20220125160004463
modified: 20220125163041347
tags: Widgets
title: QualifyWidget
! Introduction
The <<.wid qualify>> widget sets a variable
to a unique string that encodes its position within the widget tree, as identified by the stack of transcluded tiddlers that lead to that position.
Internally, it is implemented using the transclusion variable.
! Content and Attributes
The content of the <<.wid qualify>> widget is the scope for the value assigned to the <<.var name>> variable.
|!Attribute |!Description |
|//title// |The prefix for the string, normally a tiddler title |
|//name// |The name of the variable to be set to the unique string |
! Examples
The two examples below are identical, but produce different results because the second one has been transcluded from [[another tiddler|$:/editions/tw5.com/widget-examples/qualify-transcluded]].
Each example shows the result of calling <<.var qualify>> and then the value of the <<.vlink transclusion>> variable.
<$macrocall $name=".example" n="1"
eg="""<$qualify title="BaseTiddler" name="iamnotanumber">
<ul>
<li><code><<iamnotanumber>></code></li>
<li><code><<transclusion>></code></li>
</ul>
</$qualify>
"""/>
{{$:/editions/tw5.com/widget-examples/qualify-transcluded}}
! Remarks
In most cases it will be simpler to use the [[qualify Macro]].

View File

@@ -1,9 +1,9 @@
caption: transclude
created: 20130824142500000
modified: 20140717175900970
modified: 20220122190609396
tags: Widgets
title: TranscludeWidget
type: text/vnd.tiddlywiki
caption: transclude
! Introduction
@@ -22,12 +22,12 @@ The TranscludeWidget treats any contained content as a fallback if the target of
! Parsing modes
TiddlyWiki parses text in two modes:
TiddlyWiki [[parses text in two modes|WikiText Parser Modes]]:
* ''inline'' mode recognises character formatting such as emphasis, links
* ''block'' mode recognises all the ''inline'' formatting, and adds block formatting such as tables, headings and lists
* [[inline mode|Inline Mode WikiText]] recognises character formatting such as emphasis, links
* [[block mode|Block Mode WikiText]] recognises all the ''inline'' formatting, and adds block formatting such as tables, headings and lists
Usually, the mode is determined by whether the transclude widget itself has been parsed in block or inline mode. This can be overridden with the `mode` attribute.
Usually, the mode is determined by whether the transclude widget itself has been parsed in block or inline mode. This can be overridden with the <<.attr mode>> attribute.
For example, consider tiddler "A" with this content:
@@ -57,6 +57,7 @@ This can be fixed by amending tiddler "A":
#<$transclude tiddler="B" mode="block"/>
# Item two
```
See also these [[other examples|WikiText parser mode: transclusion examples]].
! ~SubTiddler Access

View File

@@ -1,6 +1,6 @@
caption: view
created: 20131024141900000
modified: 20210402093330113
modified: 20211219213444235
tags: Widgets
title: ViewWidget
type: text/vnd.tiddlywiki
@@ -27,18 +27,18 @@ The content of the `<$view>` widget is displayed if the field or property is mis
The following formats can be specified in the `format` attribute:
|!Format |!Description |
|''text'' |Plain text (default) |
|''htmlencoded'' |The field is displayed with HTML encoding |
|''text'' |Plain text (default) <<.tip "See also the TextWidget. `<$view format=text tiddler=MyTiddler/>` renders the same as `<$text text={{MyTiddler}}/>`">>|
|''htmlencoded'' |The field is displayed with HTML encoding. <<.tip "Rendered value is the same as the output from the [[encodehtml|encodehtml Operator]] filter operator">> |
|''htmltextencoded'' |<<.from-version "5.2.0">> The field is displayed with HTML encoding, only double quotes (") are not escaped. This creates a more compact htmlencoding appropriate for html text content, but //not// for attributes. |
|''urlencoded'' |The field is displayed with URL encoding |
|''doubleurlencoded'' |The field is displayed with double URL encoding |
|''urlencoded'' |The field is displayed with URL encoding <<.tip "Rendered value is the same as the output from the [[encodeuri|encodeuri Operator]] filter operator">> |
|''doubleurlencoded'' |The field is displayed with double URL encoding <<.tip "Rendered value is the same as the output from calling the [[encodeuri|encodeuri Operator]] filter operator twice">> |
|''htmlwikified'' |The field is wikified according to the mode attribute and the resulting HTML returned as plain text (ie HTML elements will appear in plain text) |
|''plainwikified'' |The field is wikified according to the mode attribute and the text content of the resulting HTML returned as plain text (ie HTML elements will be removed) |
|''htmlencodedplainwikified'' |The field is wikified according to the mode attribute and the text content of the resulting HTML returned as HTML encoded plain text (ie HTML elements will be removed) |
|''date'' |The field is interpreted as a UTC date and displayed according to the DateFormat specified in the `template` attribute |
|''relativedate'' |The field is interpreted as a UTC date and displayed as the interval from the present instant |
|''date'' |The field is interpreted as a UTC date and displayed according to the DateFormat specified in the `template` attribute <<.tip "Rendered value is the same as the output from the [[format:date|format Operator]] filter operator">> |
|''relativedate'' |The field is interpreted as a UTC date and displayed as the interval from the present instant <<.tip "Rendered value is the same as the output from the [[format:relativedate|format Operator]] filter operator">> |
|''stripcomments'' |The field is interpreted as JavaScript source code and any lines beginning `\\#` are stripped |
|''jsencoded'' |The field is displayed as a JavaScript encoded string |
|''jsencoded'' |The field is displayed as a JavaScript encoded string <<.tip "Rendered value is the same as the output from the [[stringify|stringify Operator]] filter operator">> |
!! "WikiText format"
@@ -54,3 +54,21 @@ The following example will view the core version of the tiddler [[$:/DefaultTidd
<$view tiddler="$:/core" subtiddler="$:/DefaultTiddlers"/>
'>>
! Examples
Given this [[Saturday]] example tiddler:
|!tiddler|!raw content|!rendered content|
|[[Saturday]]|<$text text={{Saturday}}/>|{{Saturday}}|
Here is how `<$view tiddler=Saturday format=<<format>>/>` renders for each format:
<table>
<tr><th>format</th><th>renders as</th></tr>
<$list filter="text htmlencoded htmltextencoded urlencoded doubleurlencoded htmlwikified plainwikified htmlencodedplainwikified stripcomments jsencoded" variable=format>
<tr>
<td>''<<format>>''</td>
<td><$view tiddler="Saturday" format=<<format>>/></td>
</tr>
</$list>
</table>

View File

@@ -1,6 +1,6 @@
caption: wikify
created: 20160321144949700
modified: 20161017122117062
modified: 20220122191540121
tags: Widgets
title: WikifyWidget
type: text/vnd.tiddlywiki
@@ -17,7 +17,7 @@ The content of the `<$wikify>` widget is the scope for the value assigned to the
|name |The name of the variable to assign |
|text |The text to parse and render |
|type |The ContentType of the text (defaults to `text/vnd.tiddlywiki`) |
|mode |The parse mode: `block` (the default) or `inline` |
|mode |The parse mode: [[block|Block Mode WikiText]] (the default) or [[inline|Inline Mode WikiText]] |
|output |Keyword indicating the desired output type, defaulting to `text` (see below) |
The available output types are:

View File

@@ -1,6 +1,6 @@
caption: HTML
created: 20131205160816081
modified: 20210614100305329
modified: 20220123174919252
tags: WikiText
title: HTML in WikiText
type: text/vnd.tiddlywiki
@@ -35,9 +35,11 @@ some text <!-- inline comment -->
! Block mode versus Inline mode
To get the content of an HTML element to be parsed in block mode, the opening tag must be followed by two linebreaks.
To get the content of an HTML element to be [[parsed|WikiText Parser Modes]] in [[block mode|Block Mode WikiText]], the opening tag must be followed by two linebreaks.
Without the two linebreaks, the tag content will be parsed in inline mode which means that block mode formatting such as wikitext tables, lists and headings is not recognised.
Without the two linebreaks, the tag content will be [[parsed|WikiText Parser Modes]] in [[inline mode|Inline Mode WikiText]] which means that block mode formatting such as wikitext tables, lists and headings is not recognised.
See also [[WikiText parser mode: HTML examples]] and [[WikiText parser mode transitions]].
! Self closing elements
@@ -56,6 +58,26 @@ In an extension of conventional HTML syntax, attributes of elements/widgets can
* a transclusion of a [[macro/variable|Macros in WikiText]]
* as the result of a [[Filter Expression]]
!! Style Attributes
<<.from-version "5.2.2">> TiddlyWiki supports the usual HTML ''style'' attribute for assigning CSS styles to elements:
```
<div style="color:red;">Hello</div>
```
In an extension to HTML, TiddlyWiki also supports accessing individual CSS styles as independent attributes. For example:
```
<div style.color="red">Hello</div>
```
The advantage of this syntax is that it simplifies assigning computed values to CSS styles. For example:
```
<div style.color={{!!color}}>Hello</div>
```
!! Literal Attribute Values
Literal attribute values can use several different styles of quoting:
@@ -92,6 +114,7 @@ attr={{tiddler}}
attr={{!!field}}
attr={{tiddler!!field}}
```
<<.warning "The attribute's value will be the exact text retrieved from the TextReference. Any wiki syntax in that text will be left as-is.">>
!! Variable Attribute Values
@@ -102,6 +125,7 @@ Variable attribute values are indicated with double angle brackets around a [[ma
...
</div>
```
<<.warning "The text from the macro's definition will be retrieved and text substitution will be performed (i.e. <<.param $param$>> and <<.param &#36;(...)&#36;>> syntax). The attribute's value will be the resulting text. Any wiki syntax in that text (including further macro calls and variable references) will be left as-is.">>
!! Filtered Attribute Values
@@ -112,4 +136,4 @@ This example shows how to add a prefix to a value:
```
<$text text={{{ [<currentTiddler>addprefix[$:/myprefix/]] }}} />
```
<<.warning "The attribute's value will be the exact text from the first item in the resulting list. Any wiki syntax in that text will be left as-is.">>

View File

@@ -1,6 +1,6 @@
caption: Images
created: 20131205160221762
modified: 20210519160846733
modified: 20220129152627668
tags: WikiText [[Working with TiddlyWiki]]
title: Images in WikiText
type: text/vnd.tiddlywiki
@@ -14,7 +14,7 @@ Images can be included in WikiText with the following syntax:
[img[https://tiddlywiki.com/favicon.ico]]
```
You can also insert images from the editor toolbar. Click ''picture'' (<<.icon $:/core/images/picture>>) and select a picture file.
You can also insert image tiddlers from the editor toolbar. Click ''picture'' (<<.icon $:/core/images/picture>>) and select a picture file.
If the image source is the title of an image tiddler then that tiddler is directly displayed. Otherwise it is interpreted as a URL and an HTML `<img>` tag is generated with the `src` attribute containing the URL.
@@ -63,6 +63,6 @@ Renders as:
! Importing Images
Use the <<.button import>> button (under the <<.sidebar-tab Tools>> tab in the sidebar), or drag and drop.
See [[ImportingTiddlers]] for details.
See [[Importing Tiddlers]] for details.
<<.from-version "5.2.0">> You can also import images by dropping or pasting images into the tiddler editor.

View File

@@ -1,6 +1,6 @@
caption: Linking
created: 20131205155230596
modified: 20160607095245257
modified: 20211230145939554
tags: WikiText
title: Linking in WikiText
type: text/vnd.tiddlywiki
@@ -80,3 +80,46 @@ You can also use the extended syntax to force an external link:
See the LinkWidget for details of the underlying widget used to implement tiddler links, including macros that can be used to customise its behaviour.
! Generating dynamic links
[[Linking in WikiText]] does not lend itself well to creating dynamic links. The reason is because this WikiText link:
```
[[link to myself|Linking in WikiText]]
```
is shorthand for using the LinkWidget and TextWidget like this:
```
<$link to="Linking in WikiText">
<$text text="link to myself"/>
</$link>
```
Since both the link title ("link to myself") and the link target ("Linking in ~WikiText") are used as widget attributes, no WikiText expansion takes place.
For example, an attempt to use a [[reference|TextReference]] and a [[variable|Variables]] to dynamically generate a link like this:
<<.bad-example "`[[{{!!caption}}|<<currentTiddler>>]]`">>
is the same as trying to use the LinkWidget and TextWidget like this:
<<.bad-example """```
<$link to="<<currentTiddler>>">
<$text text="{{!!caption}}"/>
</$link>
```""">>
This will not work as desired. Content inside of quoted widget attributes is [[treated as a literal value|HTML in WikiText]] and protected from WikiText expansion, so it will render like this:
<<.bad-example "[[{{!!caption}}|<<currentTiddler>>]]">>
In order to get the desired result, the LinkWidget can be used directly like this:
<<wikitext-example-without-html src:"<$link to=<<currentTiddler>>>{{!!caption}}</$link>">>
See also another example of [[constructing dynamic links|Concatenating text and variables using macro substitution]].
! Linking within tiddlers - "anchor links"
In TiddlyWiki anchor links can help us link to target points and distinct sections within rendered tiddlers. They can help the reader navigate longer tiddler content.
See [[Anchor Links using HTML]] for more information.

View File

@@ -1,9 +1,9 @@
caption: Macro Calls
created: 20150220182252000
modified: 20150221221340000
modified: 20220122193853161
tags: WikiText
title: Macro Calls in WikiText
type: text/vnd.tiddlywiki
caption: Macro Calls
To call a [[macro|Macros]], place `<<`double angle brackets`>>` around the name and any parameter values.
@@ -19,7 +19,7 @@ The syntax is actually a shorthand for a <<.wlink MacroCallWidget>> widget. The
As macros are simply parameterised [[variables|Variables]], a variable's value can be inserted using the same techniques.
[[Examples|Macro Calls in WikiText (Examples)]]
[[Examples|Macro Calls in WikiText (Examples)]] and [[more examples|WikiText parser mode: macro examples]]
!! Named vs.unnamed parameters

View File

@@ -1,6 +1,6 @@
caption: Transclusion
created: 20131205160146648
modified: 20150220161347000
modified: 20220122193352028
tags: WikiText
title: Transclusion in WikiText
type: text/vnd.tiddlywiki
@@ -48,3 +48,4 @@ See also:
* TemplateTiddlers
* TranscludeWidget
* [[Transclusion and Substitution]]
* [[WikiText parser mode: transclusion examples]]

View File

@@ -1,6 +1,6 @@
caption: Widgets
created: 20131205160840915
modified: 20161020210726813
modified: 20220122193129241
tags: WikiText
title: Widgets in WikiText
type: text/vnd.tiddlywiki
@@ -20,8 +20,8 @@ Note that widgets inherit all the features of [[HTML in WikiText]]:
** Macro invocations (eg `attr=<<myMacro>>`)
** Transclusions (eg, `attr={{MyTiddler!!field}}`)
** Filtered transclusions (eg, `attr={{{ [filter[op]] }}}`)
* The content of a widget is parsed in inline mode unless the opening tag is followed by two linebreaks, which forces block mode
** 'Inline mode' means that 'block mode' parse rules like headings, tables and lists are not recognised
* The content of a widget is [[parsed|WikiText Parser Modes]] in [[inline mode|Inline Mode WikiText]] unless the opening tag is followed by two linebreaks, which forces [[block mode|Block Mode WikiText]]
** [[inline mode|Inline Mode WikiText]] means that [[block mode|Block Mode WikiText]] parse rules like headings, tables and lists are not recognised
See [[HTML in WikiText]] for more details.

View File

@@ -0,0 +1,51 @@
created: 20220115152811251
modified: 20220115161035903
tags: [[Block Mode WikiText]]
title: Block Mode WikiText (Examples)
type: text/vnd.tiddlywiki
[[Paragraphs|Paragraphs in WikiText]] are the most common WikiText. It is important to know they do not end until a blank line is encountered. Once a paragraph starts the parser will be in ''inline mode''. Until that blank line is encountered other ''block mode'' syntax will be ignored:
<<<
<<wikitext-example-without-html src:'This is a paragraph.
Only __//inline mode//__ punctuation is recognised here.
Block mode punctuation will be <b>ignored</b> until
the paragraph ends (i.e. a blank line is encountered).
For example:
* List item punctuation is ignored
* So is this horizontal rule:
---
|tables|are|ignored|
! headings are ignored
<<<
multi-line block quotes are ignored
<<<
'>>
<<<
To get the parser to recognise the above ''block mode'' WikiText, a blank line needs to be inserted after the "For example:" line. The blank line will be treated as the end of the paragraph and the parser will start recognising ''block mode'' punctuation again. Like this:
<<<
<<wikitext-example-without-html src:'This is a paragraph.
Only __//inline mode//__ punctuation is recognised here.
Block mode punctuation will be <b>ignored</b> until
the paragraph ends (i.e. a blank line is encountered).
For example, here is a blank line:
* due to above blank line,
* list items work
* the following horizontal rule also works:
---
|!tables|!work|
|cell 1| cell 2|
! Headings work
<<<
multi-line block quotes work
<<<
; Term
: Definition of that term
Another paragraph can start here, but it will not end until blank line
'>>
<<<
All the block mode examples above except for the paragraph are written one line after the other without blanks between. Those types of WikiText don't require the extra blank line to terminate.

View File

@@ -0,0 +1,35 @@
caption: block parser mode
created: 20220110234234616
modified: 20220122182842032
tags: [[WikiText Parser Modes]]
title: Block Mode WikiText
type: text/vnd.tiddlywiki
Some WikiText is recognised only while the parser is in block mode.
Common characteristics of such block mode WikiText:
* At least one entire line is required to delimit the WikiText.
* The closing punctuation must come at the end of the line (in some cases the end of the line //is// the closing punctuation.
|!~WikiText|!Punctuation|
|[[Block Quotes in WikiText]] |Multi-line block quotes are enclosed by lines containing only the text `<<<`; single line block quotes are also possible.|
|[[Code Blocks in WikiText]]|Enclosed by lines containing only the text <code>&#96;&#96;&#96;</code>|
|[[Definitions in WikiText]]|Each term is on its own line and each definition is on its own line.|
|[[Hard Linebreaks in WikiText]]|Enclosed by lines containing only the text `"""`.|
|[[Headings in WikiText]]|Entire line starting with `!`.|
|[[Horizontal Rules in WikiText]]|A line containing only the text `---`.|
|[[Lists in WikiText]]|Each list item is on its own line.|
|[[Paragraphs in WikiText]]|Any text other than the start punctuation of one of the other block mode WikiText will start a paragraph. Even the start punctuation of inline mode WikiText will start a paragraph. The parser includes all following lines into the paragraph until it encounters a blank line.|
|[[Styles and Classes in WikiText]]|Enclosed by lines starting with `@@`.|
|[[Tables in WikiText]]|Each table row is a line starting and ending with `|`.|
|[[Typed Blocks in WikiText]]|Enclosed by lines starting with `$$`.|
The above WikiText types are only recognised in ''block mode''. However, the text <<.em enclosed>> by most of them will be parsed in ''inline mode'' ([[Block Quotes in WikiText]] and [[Styles and Classes in WikiText]] are the two exceptions in which the parser will continue in ''block mode''). While in ''inline mode'' the parser may encounter something which moves it to ''block mode'' (see [[WikiText parser mode transitions]]).
At the end of the terminating line, the parser will return to ''block mode''.
<<.tip 'Note: [[Hard Linebreaks in WikiText]] require an extra blank line after the trailing `"""` before the parser will return to <b>block mode</b>'>>.
If the punctuation for the above types of WikiText is encountered while the parser is in ''inline mode'', it will be //ignored// and output as-is.
[[Examples|Block Mode WikiText (Examples)]]

View File

@@ -0,0 +1,26 @@
caption: inline parser mode
created: 20220111000108618
modified: 20220122182842036
tags: [[WikiText Parser Modes]]
title: Inline Mode WikiText
type: text/vnd.tiddlywiki
Some WikiText is recognised only while the parser is in inline mode.
These WikiText types can be expressed without an entire line of text. They aren't required to be all on one line, just that they <<.em can>> be expressed within a single line. And as such, more than one can appear within a single line. In other words, line endings are not involved while the parser tries to find where the particular WikiText begins and ends While the parser is in inline mode, it will recognise the punctuation for these WikiText types:
* [[Dashes in WikiText]]
* [[Formatting in WikiText]]
* [[HTML in WikiText]]
* [[Images in WikiText]]
* [[Linking in WikiText]]
* [[Macro Calls in WikiText]]
* [[Styles and Classes in WikiText]] (single line version only)
* [[Transclusion in WikiText]]
* [[Variables in WikiText]]
* [[Widgets in WikiText]]
<<.tip """[[Macro Calls in WikiText]] and [[Transclusion in WikiText]] will be recognised in block mode if the macro call or transclusion spans an entire line.""">>
<<.tip """The other ''inline mode'' WikiText types are technically <<.em only>> detected while the parser is in ''inline mode''. However, the opening punctuation will also trigger the start of [[Paragraphs in WikiText]] which will automatically cause the parser to go into ''inline mode''. Therefore, practically speaking, it is just as useful to consider these WikiText types as recognised while the parser is in either ''inline mode'' or ''block mode''""">>
While processing the //enclosed// text of some of these WikiText types, the parser [[will not look for new WikiText|Places where the parser ignores WikiText]]. But for rest of these WikiText types, the parser will continue in ''inline mode'' for the //enclosed// text. While parsing that text, it might encounter something which [[moves it to block mode|WikiText parser mode transitions]].

View File

@@ -0,0 +1,14 @@
caption: ignore parser mode
created: 20220111000929700
modified: 20220122182842038
tags: [[WikiText Parser Modes]]
title: Places where the parser ignores WikiText
type: text/vnd.tiddlywiki
Text enclosed by these constructs is skipped by the parser and WikiText punctuation will be ignored:
|[[Code Blocks in WikiText]]|One of the main purposes of code blocks is to suppress wikitext expansion. Once the code block starts, the parser will ignore all WikiText punctuation until the code block ends.|
|[[Images in WikiText]]|`[[img|literal image link text]]` - the text enclosed by square braces will be ignored. This means, for example, [[transclusions|Transclusion in WikiText]] and [[macro calls|Macro Calls in WikiText]] cannot be used to dynamically construct the link text|
|[[Linking in WikiText]]|`[[literal link target|literal link text]]` - the text enclosed by square braces will be ignored. This means, for example, [[transclusions|Transclusion in WikiText]] and [[macro calls|Macro Calls in WikiText]] cannot be used to dynamically construct the link target or the link text|
|[[Macro Calls in WikiText]]|`<<mymacro ''notbold'' "literal text" "<<macro_expansion_ignored>>" {{transclusion_ignored}}>>` - while processing the text enclosed by a macro call, the parser will follow special rules for detecting macro parameters. These rules do not include detection of WikiText. However, after the parameters are substituted into the macro definition, the result will be parsed using [[normal rules|Wiki Text Parser Modes]]. This will likely result in the detection of any WikiText.|

View File

@@ -0,0 +1,13 @@
created: 20220110233944530
modified: 20220122182842030
tags: WikiText
title: WikiText Parser Modes
type: text/vnd.tiddlywiki
The WikiText parser has three modes:
* ''pragma mode'' - the parser will recognise only [[pragma mode WikiText|Pragma]] punctuation
* ''block mode'' - the parser will recognise only [[block mode WikiText|Block Mode WikiText]] punctuation
* ''inline mode'' - the parser will recognise only [[inline mode WikiText|Inline Mode WikiText]]
The parser [[transitions between these modes|WikiText parser mode transitions]] based on the text it encounters. In addition, there are [[places where the parser ignores WikiText|Places where the parser ignores WikiText]] punctuation.

View File

@@ -0,0 +1,59 @@
created: 20220110235808139
modified: 20220122184232928
tags: [[WikiText Parser Modes]]
title: WikiText parser mode transitions
type: text/vnd.tiddlywiki
This is a <<.em rough>> diagram whose lines mostly correspond to the parser mode transitions described below:
<$railroad text="""
{<"pragma mode">
{(
{<"inline mode"> +} |
({<"block mode">
+("<<<" | "@@" | "$$")
}
"other block mode start punct")
{<"inline mode"> +}
)
+(
"block mode close punctuation" |
("blank line" "html open tag")
)}
+("transclude widget" | "macrocall")
}
"""/>
!! Start mode
By default the parser starts in [[block mode|Block Mode WikiText]]. However, a tiddler can instead be transcluded with [[inline mode|Inline Mode WikiText]] in which case [[block mode WikiText|Block Mode WikiText]] will not be recognised.
At the start of text only, the parser will also recognise any [[pragma mode WikiText|Pragma]].
!! Transitions from pragma mode
At the start of text, the parser will recognise any [[pragma|Pragma]]. If none are found then it will move to [[inline|Inline Mode WikiText]] or [[block|Block Mode WikiText]] mode depending on the transclusion mode. If any [[pragma|Pragma]] are found then it will continue looking for [[pragma|Pragma]] until it finds one or more blank lines not followed by the start of a new pragma.
!! Transitions from block mode
When the parser encounters most [[block mode|Block Mode WikiText]] start punctuation it transitions to [[inline mode|Inline Mode WikiText]]. This means
he text enclosed by most [[block mode|Block Mode WikiText]] constructs will be parsed using [[inline mode|Inline Mode WikiText]].
<<.tip """The start "punctuation" for a paragraph is "invisible". Even for paragraphs the parser moves to [[inline mode|Inline Mode WikiText]]""">>
However, there are a few constructs whose enclosed text is parsed using [[block mode|Block Mode WikiText]]:
* [[Multi-line block quotes|Block Quotes in WikiText]]
* [[Multi-line style blocks|Styles and Classes in WikiText]]
* [[Typed blocks|Typed Blocks in WikiText]]
When the start punctuation for these are encountered, the enclosed text will continue to be parsed in [[block mode|Block Mode WikiText]].
[[Horizontal rules|Horizontal Rules in WikiText]] are another special case. They do not enclose any text, so there is no opportunity for the parser to transition to [[inline mode|Inline Mode WikiText]].
Opening [[widget|Widgets in WikiText]] or [[HTML|HTML in WikiText]] tags provide another way the parser can transition. When such a tag is <<.em not>> followed by a blank line, then the contents enclosed by the tag will be parsed in [[inline mode|Inline Mode WikiText]]. See the [[HTML examples|WikiText parser mode: HTML examples]].
!! Transitions from inline mode
* The parser will move back to [[block mode|Block Mode WikiText]] after the end of a line which terminates [[block mode|Block Mode WikiText]] ~WikiText. In other words, when the block mode close punctuation is encountered.
* When the opening [[widget|Widgets in WikiText]] or [[HTML|HTML in WikiText]] tag is followed by a blank line, then the contents enclosed by the tag will be parsed in [[block mode|Block Mode WikiText]]. See the [[HTML examples|WikiText parser mode: HTML examples]].
* Transcluded text and text pulled in via a macro call can transition the parser away from [[inline mode|Inline Mode WikiText]]. See [[transclusion examples|WikiText parser mode: transclusion examples]] and [[macro examples|WikiText parser mode: macro examples]] for more details.

View File

@@ -0,0 +1,72 @@
created: 20220122153235162
modified: 20220122180508134
tags: [[WikiText parser mode transitions]]
title: WikiText parser mode: HTML examples
type: text/vnd.tiddlywiki
<<wikitext-example-without-html "<div>
* blank line after open tag allows
* block mode punctuation (i.e. this list) to
* be recognised
</div>
">>
---
The open tag blank line "trick" also works inside of punctuation only recognised in inline mode (such as [[Formatting in WikiText]]):
<<wikitext-example-without-html "''<div>
* list item one
* list item two
</div>''">>
---
<<wikitext-example-without-html "<div>
* Open tag without a blank line means
* block mode punctuation (i.e. this list) will
* NOT be recognised.
Paragraphs are only recognised in block mode. Even with blank lines, new paragraphs are not recognised.
This also is not a new paragraph.
</div>">>
---
[[Tables in WikiText]] is one construct for which the open tag blank line "trick" cannot work. In order for the parser to recognise a table row, the entire row must be on a single line.
Adding a blank link after an open tag within a table cell causes the row to span mulitple lines and the parser ceases to be able to recognise it as a table row.
<<wikitext-example-without-html "|table row|all on|one line|is recognised|">>
<<wikitext-example-without-html "|For a blank line after open tag|<div>
* list is recognised
* but the surrounding table row is not
</div>|">>
---
The only way to get [[block mode|Block Mode WikiText]] punctuation recognised in [[wikitext tables|Tables in WikiText]] is to use <<.wlink TranscludeWidget>> with <<.attr mode>> = <<.value block>>.
<<wikitext-example-without-html '|Nested table:|<$transclude tiddler="table-example" mode=block/>|'>>
Note that <<.wlink MacroCallWidget>> does not have a similar <<.attr mode>> attribute and the content of macro definitions can only be parsed in [[inline mode|Inline Mode WikiText]]
---
The less convenient `<table>`, `<tr>`, `<td>` html tags can be used as a foolproof way to get [[block mode|Block Mode WikiText]] punctuation recognised inside of table cells.
<<wikitext-example-without-html "<table>
<tr><td>
* list item one
* list item two
</td><td>
|nested|table|
</td></tr>
</table>">>

View File

@@ -0,0 +1,55 @@
created: 20220122144742419
modified: 20220122180929683
tags: [[WikiText parser mode transitions]]
title: WikiText parser mode: macro examples
type: text/vnd.tiddlywiki
\define boringtable()
|cell one|cell two|
|cell three|cell four|
\end
With the macro `boringtable` defined as:
<$codeblock code=<<boringtable>>/>
then
<table><<wikitext-example-table-header>><tbody>
<<wikitext-example-table-row 1 "* <<boringtable>>">>
<<wikitext-example-table-row 2 """* <div>
<<boringtable>>
</div>
""">>
<<wikitext-example-table-row 3 "* <$macrocall $name=boringtable/>">>
<<wikitext-example-table-row 4 "* <$macrocall $name=boringtable></$macrocall>">>
<<wikitext-example-table-row 5 """* <$macrocall $name=boringtable>
</$macrocall>""">>
</tbody></table>
The list syntax is recognised in [[block mode|Block Mode WikiText]] and the enclosed contents are parsed using [[inline mode|Inline Mode WikiText]]. When the parser encounters a [[wikitext macro call|Macro Calls in WikiText]] it will use the current parse mode to parse the contents of the macro. The contents of the macro contains table syntax which is only recognised in [[block mode|Block Mode WikiText]].
Therefore, in #1 above the table syntax is not recognised. In #2 above, the blank line after the open `div` tag moves the parser back into [[block mode|Block Mode WikiText]], the macro call inherits it and the table is recognised.
When calling macros using the [[widget|MacroCallWidget]], the parse mode will be inline (#3 and #4 above) unless it is written as an open tag with a following blank line (#5 above).
<<.tip "See also [[WikiText parser mode: transclusion examples]] for similar examples">>
---
These examples have slightly different behavior. In the previous section, the macro calls were enclosed within list items. In these examples, the macro calls are at the top level:
<table><<wikitext-example-table-header>><tbody>
<<wikitext-example-table-row 1 "<<boringtable>>">>
<<wikitext-example-table-row 2 """<div>
<<boringtable>>
</div>
""">>
<<wikitext-example-table-row 3 "<$macrocall $name=boringtable/>">>
<<wikitext-example-table-row 4 "<$macrocall $name=boringtable></$macrocall>">>
<<wikitext-example-table-row 5 """<$macrocall $name=boringtable>
</$macrocall>""">>
</tbody></table>
Of these examples, only the two <<.wlink MacroCallWidget>> tags which are not followed by a blank line are parsed using [[inline mode|Inline Mode WikiText]].
<<.tip "See also [[WikiText parser mode: transclusion examples]] for similar examples">>

View File

@@ -0,0 +1,56 @@
created: 20220122145022547
modified: 20220122180845946
tags: [[WikiText parser mode transitions]]
title: WikiText parser mode: transclusion examples
type: text/vnd.tiddlywiki
Given the tiddler [[table-example]] defined with these contents:
<$codeblock code={{table-example}}/>
then
<table><<wikitext-example-table-header>><tbody>
<<wikitext-example-table-row 1 "* {{table-example}}">>
<<wikitext-example-table-row 2 """* <div>
{{table-example}}
</div>
""">>
<<wikitext-example-table-row 3 "* <$transclude tiddler=table-example/>">>
<<wikitext-example-table-row 4 "* <$transclude tiddler=table-example></$transclude>">>
<<wikitext-example-table-row 5 """* <$transclude tiddler=table-example>
</$transclude>""">>
<<wikitext-example-table-row 6 "* <$transclude tiddler=table-example mode=block/>">>
</tbody></table>
The list syntax is recognised in [[block mode|Block Mode WikiText]] and the enclosed contents are parsed using [[inline mode|Inline Mode WikiText]]. When the parser encounters a [[wikitext transclusion|Transclusion in WikiText]] it will use the current parse mode to parse the contents of the transcluded tiddler. The contents of the example tiddler contains table syntax which is only recognised in [[block mode|Block Mode WikiText]].
Therefore, in #1 above the table syntax is not recognised. In #2 above, the blank line after the open `div` tag moves the parser back into [[block mode|Block Mode WikiText]], the transcluded text inherits it and the table is recognised.
When transcluding tiddlers using the [[widget|TranscludeWidget]], the parse mode will be inline (#3 and #4 above) unless it is written as an open tag with a following blank line (#5 above).
<<.tip "See also [[WikiText parser mode: macro examples]] for similar examples. The only difference here is <<.wlink TranscludeWidget>> has a <<.attr mode>> attribute (extra example #6) which allows the parse mode to be explicitly overridden rather than come implicitly based on the they way the tag is written">>
---
In these examples, the transclusions are at the top level instead of enclosed in list items:
<table><<wikitext-example-table-header>><tbody>
<<wikitext-example-table-row 1 "{{table-example}}">>
<<wikitext-example-table-row 2 """<div>
{{table-example}}
</div>
""">>
<<wikitext-example-table-row 3 "<$transclude tiddler=table-example/>">>
<<wikitext-example-table-row 4 "<$transclude tiddler=table-example></$transclude>">>
<<wikitext-example-table-row 5 """<$transclude tiddler=table-example>
</$transclude>""">>
<<wikitext-example-table-row 6 "<$transclude tiddler=table-example mode=inline/>">>
</tbody></table>
Of these examples, only the two <<.wlink TranscludeWidget>> tags which are not followed by a blank line and the widget call using <<.attr mode>>=<<.value inline>> are parsed using [[inline mode|Inline Mode WikiText]].
<<.tip "See also [[WikiText parser mode: macro examples]] for similar examples">>

View File

@@ -0,0 +1,8 @@
created: 20220118023452157
modified: 20220118023529825
tags: [[WikiText parser mode transitions (Examples)]]
title: table-example
type: text/vnd.tiddlywiki
|cell one|cell two|
|cell three|cell four|

View File

@@ -1,6 +1,5 @@
title: $:/language/ControlPanel/
Advanced/Caption: Zaawansowane
Advanced/Hint: Wewnętrzne informacje na temat TiddlyWiki
Appearance/Caption: Wyświetlanie
@@ -28,10 +27,15 @@ Basics/Tiddlers/Prompt: Liczba tiddlerów
Basics/Title/Prompt: Tytuł tej ~TiddlyWiki
Basics/Username/Prompt: Nazwa użytkownika do podpisywania zmian
Basics/Version/Prompt: Wersja ~TiddlyWiki
Cascades/Caption: Kaskada
Cascades/Hint: Kaskady pozwalaja dynamicznie zmieniać sposób wyświetlania tiddlera zależnie od jej wyniku. Pierwszy niepusty wynik filtra poniżej będzie użyty jako szablon. Rózne kaskady zmieniają rózne elementy szablonu.
Cascades/TagPrompt: Filtry z tagiem <$macrocall $name="tag" tag=<<currentTiddler>>/>
EditorTypes/Caption: Typy edytorów
EditorTypes/Editor/Caption: Edytor
EditorTypes/Hint: Te tiddlery określają który edytor jest używany do edycji tiddlerów danych typów.
EditorTypes/Type/Caption: Typ
EditTemplateBody/Caption: Treść Edytora Tiddlera
EditTemplateBody/Hint: Ta kaskada określa szablon do edycji treści tiddlera, używany podczas edycji tiddlera.
Info/Caption: Info
Info/Hint: Informacje o tej TiddlyWiki
KeyboardShortcuts/Add/Prompt: Wpisz tu skrót
@@ -192,6 +196,8 @@ Settings/TitleLinks/Yes/Description: Wyświetlaj nazwy jako linki
Settings/MissingLinks/Caption: Wiki Linki
Settings/MissingLinks/Hint: Wybierz czy linkować do nieistniejących jeszcze tiddlerów
Settings/MissingLinks/Description: Włacz linowanie do nieistniejących tiddlerów
StoryTiddler/Caption: Widok Tiddlera
StoryTiddler/Hint: Ta kaskada określa szablon używany podczas wyświetlania tiddlera w Story River.
StoryView/Caption: Widok Story River
StoryView/Prompt: Obecny widok:
Stylesheets/Caption: Style:
@@ -202,6 +208,10 @@ Theme/Caption: Motyw
Theme/Prompt: Obecny motyw:
TiddlerFields/Caption: Pola Tiddlerów
TiddlerFields/Hint: To jest pełna lista wszystich pól użytych w tej wiki (wliczając systemowe tiddlery ale nie tiddlery-cienie)
TiddlerColour/Caption: Kolor Tiddlera
TiddlerColour/Hint: Ta kaskada określa kolor używany do wyswietlania tiddlera (kolor ikony oraz taga).
TiddlerIcon/Caption: Ikona Tiddlera
TiddlerIcon/Hint: Ta kaskada określa ikonę używaną przez Tiddlera.
Toolbars/Caption: Paski Narzędzi
Toolbars/EditToolbar/Caption: Edytuj Pasek Narzędzi
Toolbars/EditToolbar/Hint: Wybierz, które przyciski mają być widoczne podczas edycji tiddlera. Przeciągaj by zmieniać kolejność.
@@ -213,4 +223,7 @@ Toolbars/EditorToolbar/Hint: Wybierz które przyciski mają być widoczne w pask
Toolbars/ViewToolbar/Caption: Pasek Narzędzi Oglądania
Toolbars/ViewToolbar/Hint: Wybierz które przyciski są widoczne podczas oglądania tiddlera. Przeciągaj by zmieniać kolejność.
Tools/Download/Full/Caption: Pobierz całą wiki.
ViewTemplateBody/Caption: Treść Wyświetlanego Tiddlera
ViewTemplateBody/Hint: Ta kaskada określa szablon wyświetlania treści tiddlera (czyli jego tekstu, w przeciwieństwie do kaskady 'Widok Tiddlera').
ViewTemplateTitle/Caption: Tytuł Wyświetlanego Tiddlera
ViewTemplateTitle/Hint: Ta kaskada określa szablon wyświetlania tytułu tiddlera.

View File

@@ -3,6 +3,7 @@ title: $:/language/Docs/Fields/
_canonical_uri: 外部图像条目的完整的 URI
bag: 条目的来源集的名称
caption: 显示于页签或按钮上的标题文字
code-body: 若设置为 ''yes'',视图模板将以程式码形式显示条目
color: 条目的 CSS 颜色值
component: 负责[[警示条目|AlertMechanism]]的组件名称
created: 条目的创建日期
@@ -13,8 +14,9 @@ description: 插件的说明、描述
draft.of: 草稿条目,包含条目的标题、标签、栏位 ...
draft.title: 草稿条目的标题
footer: wizard 的注脚
hide-body: 若设置为 ''yes'',视图模板将隐藏条目的主体
icon: 条目的标题含有与条目关联的图标
library: 若设为 "yes",表示条目应该被保存为一个 JavaScript 程序库
library: 若设''yes'',表示条目应该被保存为一个 JavaScript 程序库
list: 条目的列表,指定一些条目的标题清单
list-before:当前条目名称将被添加到条目排序清单中的设置条目名称之前,或若此栏位存在但是空的,则被添加于清单的前端
list-after: 当前条目名称将被添加到条目排序清单的设置条目名称之后,或若此栏位存在但是空的,则被添加于清单的尾端
@@ -31,7 +33,7 @@ tags: 条目的标签清单
text: 条目的内文
throttle.refresh: 如果存在,则限制此条目的刷新
title: 条目的唯一名称
toc-link: 若设为: "no",则抑制目录树中的条目链接。
toc-link: 若设置为 ''no'',则抑制目录树中的条目链接。
type: 条目的内容类型
version: 插件的版本信息
_is_skinny: 如果存在,则表示必须从服务器加载条目的文本字段

View File

@@ -14,7 +14,7 @@ ConfirmAction: 是否要继续?
Count: 计数
DefaultNewTiddlerTitle: 新条目
Diffs/CountMessage: <<diff-count>> 个差异
DropMessage: 拖放到此处 (或按 ESC 键取消)
DropMessage: 现在放下(或按 ESC 键取消)
Encryption/Cancel: 取消
Encryption/ConfirmClearPassword: 您要清除密码吗?当保存此维基时,这将删除已套用的加密
Encryption/Username: 用户名称

View File

@@ -3,6 +3,7 @@ title: $:/language/Docs/Fields/
_canonical_uri: 外部圖片條目的完整的 URI
bag: 條目的來源集的名稱
caption: 顯示於頁籤或按鈕上的標題文字
code-body: 若設定為 ''yes'',檢視範本將以程式碼形式顯示條目
color: 條目的 CSS 顏色值
component: 負責[[警示條目|AlertMechanism]]的元件名稱
created: 條目的建立日期
@@ -13,8 +14,9 @@ description: 插件的說明、描述
draft.of: 草稿條目,包含條目的標題、標籤、欄位 ...
draft.title: 草稿條目的標題
footer: wizard 的註腳
hide-body: 若設定為 ''yes'',檢視範本將隱藏條目的主體
icon: 條目的標題含有與條目關聯的圖示
library: 若設為 "yes",表示條目應該被儲存為一個 JavaScript 程式庫
library: 若設''yes'',表示條目應該被儲存為一個 JavaScript 程式庫
list: 條目的列表,指定一些條目的標題清單
list-before: 當前條目名稱將被新增到條目排序清單中的設定條目名稱之前,或若此欄位存在但是空的,則被新增於清單的前端
list-after: 當前條目名稱將被新增到條目排序清單中的設定條目名稱之後,或若此欄位存在但是空的,則被新增於清單的尾端
@@ -31,7 +33,7 @@ tags: 條目的標籤清單
text: 條目的內文
throttle.refresh: 如果存在,則限制此條目的刷新
title: 條目的唯一名稱
toc-link: 若設爲: "no",則抑制目錄樹中的條目鏈接。
toc-link: 若設定爲 ''no'',則抑制目錄樹中的條目鏈接。
type: 條目的內容類型
version: 插件的版本資訊
_is_skinny: 如果存在,則表示必須從伺服器載入條目的文字欄位

View File

@@ -14,7 +14,7 @@ ConfirmAction: 是否要繼續?
Count: 計數
DefaultNewTiddlerTitle: 新條目
Diffs/CountMessage: <<diff-count>> 個差異
DropMessage: 拖放到此處 (或按 ESC 鍵取消)
DropMessage: 現在放下(或按 ESC 鍵取消)
Encryption/Cancel: 取消
Encryption/ConfirmClearPassword: 您要清除密碼嗎?當儲存此維基時,這將刪除已套用的加密
Encryption/Username: 使用者名稱

View File

@@ -368,7 +368,7 @@ Mark Kerrigan, @markkerrigan, 2019/08/24
Stefan Schuster-Teupke, @StefanSTFG, 2019/08/26
Nils-Hero Lindemann, @heronils, 2019/08/26
Nils Lindemann, @nilslindemann, 2022/01/10
Marica Odagaki, @ento, 2019/08/30
@@ -475,3 +475,7 @@ Brian Theado, @btheado, 2021-10-10
@eiro10, 2021-11-14
Fred, @tw-FRed, 2021/12/04
Joseph Cosentino, @jc-ose, 2021-12-14
@davout1806, 2021/12/17

View File

@@ -1,7 +1,7 @@
{
"name": "tiddlywiki",
"preferGlobal": "true",
"version": "5.2.1",
"version": "5.2.2-prerelease",
"author": "Jeremy Ruston <jeremy@jermolene.com>",
"description": "a non-linear personal web notebook",
"contributors": [
@@ -23,13 +23,16 @@
"tiddlywiki5",
"wiki"
],
"dependencies": {},
"devDependencies": {
"eslint": "^7.10.0"
"eslint": "^7.32.0"
},
"bundleDependencies": [],
"license": "BSD",
"engines": {
"node": ">=0.8.2"
},
"scripts": {
"lint": "eslint ."
}
}

View File

@@ -1,9 +1,9 @@
title: $:/plugins/tiddlywiki/highlight/howto
! Supporting Additional Languages
The [[highlight.js|https://github.com/highlightjs/highlight.js]] project supports many languages. Only a subset of these languages are supported by the plugin. It is possible for users to change the set of languages supported by the plugin by following these steps:
# Go to the highlight.js project [[download page|https://highlightjs.org/download/]], select the language definitions to include, and press the Download button to download a zip archive containing customised support files for a highlight.js syntax highlighting server.
# Locate the `highlight.pack.js` file in the highlight plugin -- on a stock Debian 8 system running Tiddlywiki5 under node-js it is located at `/usr/local/lib/node_modules/tiddlywiki/plugins/tiddlywiki/highlight/files/highlight.pack.js`.
# Replace the plugin `highlight.pack.js` file located in step 2 with the one from the downloaded archive obtained in step 1.

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