mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2024-12-25 01:20:30 +00:00
Merge branch 'master' into geospatial-plugin
This commit is contained in:
commit
532d5da4c9
@ -359,14 +359,14 @@ node $TW5_BUILD_TIDDLYWIKI \
|
||||
|
||||
# Delete any existing static content
|
||||
|
||||
rm $TW5_BUILD_OUTPUT/languages/de-AT/static/*
|
||||
rm $TW5_BUILD_OUTPUT/languages/de-DE/static/*
|
||||
rm $TW5_BUILD_OUTPUT/languages/es-ES/static/*
|
||||
rm $TW5_BUILD_OUTPUT/languages/fr-FR/static/*
|
||||
rm $TW5_BUILD_OUTPUT/languages/ja-JP/static/*
|
||||
rm $TW5_BUILD_OUTPUT/languages/ko-KR/static/*
|
||||
rm $TW5_BUILD_OUTPUT/languages/zh-Hans/static/*
|
||||
rm $TW5_BUILD_OUTPUT/languages/zh-Hant/static/*
|
||||
rm -rf $TW5_BUILD_OUTPUT/languages/de-AT/static/*
|
||||
rm -rf $TW5_BUILD_OUTPUT/languages/de-DE/static/*
|
||||
rm -rf $TW5_BUILD_OUTPUT/languages/es-ES/static/*
|
||||
rm -rf $TW5_BUILD_OUTPUT/languages/fr-FR/static/*
|
||||
rm -rf $TW5_BUILD_OUTPUT/languages/ja-JP/static/*
|
||||
rm -rf $TW5_BUILD_OUTPUT/languages/ko-KR/static/*
|
||||
rm -rf $TW5_BUILD_OUTPUT/languages/zh-Hans/static/*
|
||||
rm -rf $TW5_BUILD_OUTPUT/languages/zh-Hant/static/*
|
||||
|
||||
# /languages/de-AT/index.html Demo wiki with de-AT language
|
||||
# /languages/de-AT/empty.html Empty wiki with de-AT language
|
||||
|
@ -313,7 +313,7 @@ $tw.utils.getLocationHash = function() {
|
||||
var idx = href.indexOf('#');
|
||||
if(idx === -1) {
|
||||
return "#";
|
||||
} else if(idx < href.length-1 && href[idx+1] === '#') {
|
||||
} else if(href.substr(idx + 1,1) === "#" || href.substr(idx + 1,3) === "%23") {
|
||||
// Special case: ignore location hash if it itself starts with a #
|
||||
return "#";
|
||||
} else {
|
||||
|
@ -232,10 +232,32 @@ DropZoneWidget.prototype.handleDropEvent = function(event) {
|
||||
};
|
||||
|
||||
DropZoneWidget.prototype.handlePasteEvent = function(event) {
|
||||
var self = this,
|
||||
readFileCallback = function(tiddlerFieldsArray) {
|
||||
var self = this;
|
||||
var readFileCallback = function(tiddlerFieldsArray) {
|
||||
self.readFileCallback(tiddlerFieldsArray);
|
||||
};
|
||||
var getItem = function(type) {
|
||||
type = type || "text/plain";
|
||||
return function(str) {
|
||||
// Use the deserializer specified if any
|
||||
if(self.dropzoneDeserializer) {
|
||||
tiddlerFields = self.wiki.deserializeTiddlers(null,str,{title: self.wiki.generateNewTitle("Untitled " + type)},{deserializer:self.dropzoneDeserializer});
|
||||
if(tiddlerFields && tiddlerFields.length) {
|
||||
readFileCallback(tiddlerFields);
|
||||
}
|
||||
} else {
|
||||
tiddlerFields = {
|
||||
title: self.wiki.generateNewTitle("Untitled " + type),
|
||||
text: str,
|
||||
type: type
|
||||
};
|
||||
if($tw.log.IMPORT) {
|
||||
console.log("Importing string '" + str + "', type: '" + type + "'");
|
||||
}
|
||||
readFileCallback([tiddlerFields]);
|
||||
}
|
||||
}
|
||||
};
|
||||
// Let the browser handle it if we're in a textarea or input box
|
||||
if(["TEXTAREA","INPUT"].indexOf(event.target.tagName) == -1 && !event.target.isContentEditable) {
|
||||
var self = this,
|
||||
@ -251,27 +273,10 @@ DropZoneWidget.prototype.handlePasteEvent = function(event) {
|
||||
});
|
||||
} else if(item.kind === "string") {
|
||||
// Create tiddlers from string items
|
||||
var tiddlerFields,
|
||||
type = item.type;
|
||||
item.getAsString(function(str) {
|
||||
// Use the deserializer specified if any
|
||||
if(self.dropzoneDeserializer) {
|
||||
tiddlerFields = self.wiki.deserializeTiddlers(null,str,{title: self.wiki.generateNewTitle("Untitled")},{deserializer:self.dropzoneDeserializer});
|
||||
if(tiddlerFields && tiddlerFields.length) {
|
||||
readFileCallback(tiddlerFields);
|
||||
}
|
||||
} else {
|
||||
tiddlerFields = {
|
||||
title: self.wiki.generateNewTitle("Untitled"),
|
||||
text: str,
|
||||
type: type
|
||||
};
|
||||
if($tw.log.IMPORT) {
|
||||
console.log("Importing string '" + str + "', type: '" + type + "'");
|
||||
}
|
||||
readFileCallback([tiddlerFields]);
|
||||
}
|
||||
});
|
||||
var tiddlerFields;
|
||||
// It's important to give getAsString a closure with the right type
|
||||
// So it can be added to the import queue
|
||||
item.getAsString(getItem(item.type));
|
||||
}
|
||||
}
|
||||
// Tell the browser that we've handled the paste
|
||||
|
@ -82,7 +82,7 @@ MessageCatcherWidget.prototype.render = function(parent,nextSibling) {
|
||||
}
|
||||
});
|
||||
// Render children
|
||||
this.renderChildren(parent,null);
|
||||
this.renderChildren(parent,nextSibling);
|
||||
};
|
||||
|
||||
/*
|
||||
|
@ -13,13 +13,13 @@ caption: {{$:/language/ControlPanel/LayoutSwitcher/Caption}}
|
||||
<$set name="cls" filter="[all[current]field:title{$:/layout}]" value="tc-chooser-item tc-chosen" emptyValue="tc-chooser-item">
|
||||
<div class=<<cls>>>
|
||||
<$link to={{!!title}}>
|
||||
''<$transclude field="name"/>'' - <$transclude field="description"/>
|
||||
''<$transclude tiddler={{{ [<currentTiddler>get[icon]] }}}/><$transclude field="name"/>'' - <$transclude field="description"/>
|
||||
</$link></div></$set>
|
||||
""">
|
||||
<$set name="cls" filter="[all[current]field:title[$:/core/ui/PageTemplate]]" value="tc-chooser-item tc-chosen" emptyValue="tc-chooser-item">
|
||||
<div class=<<cls>>>
|
||||
<$link to={{!!title}}>
|
||||
''<$transclude field="name"/>'' - <$transclude field="description"/>
|
||||
''<$transclude tiddler={{{ [<currentTiddler>get[icon]] }}}/><$transclude field="name"/>'' - <$transclude field="description"/>
|
||||
</$link>
|
||||
</div>
|
||||
</$set>
|
||||
|
@ -2,26 +2,17 @@ title: $:/core/ui/MoreSideBar/Tags
|
||||
tags: $:/tags/MoreSideBar
|
||||
caption: {{$:/language/SideBar/Tags/Caption}}
|
||||
|
||||
<$set name="tv-config-toolbar-icons" value="yes">
|
||||
|
||||
<$set name="tv-config-toolbar-text" value="yes">
|
||||
|
||||
<$set name="tv-config-toolbar-class" value="">
|
||||
|
||||
{{$:/core/ui/Buttons/tag-manager}}
|
||||
|
||||
</$set>
|
||||
|
||||
</$set>
|
||||
|
||||
</$set>
|
||||
\whitespace trim
|
||||
|
||||
<$let tv-config-toolbar-icons="yes" tv-config-toolbar-text="yes" tv-config-toolbar-class="">
|
||||
<div class="tc-tiny-v-gap-bottom">
|
||||
{{$:/core/ui/Buttons/tag-manager}}
|
||||
</div>
|
||||
</$let>
|
||||
<$list filter={{$:/core/Filters/AllTags!!filter}}>
|
||||
|
||||
<$transclude tiddler="$:/core/ui/TagTemplate"/>
|
||||
|
||||
<div class="tc-tiny-v-gap-bottom">
|
||||
<$transclude tiddler="$:/core/ui/TagTemplate"/>
|
||||
</div>
|
||||
</$list>
|
||||
|
||||
<hr class="tc-untagged-separator">
|
||||
|
||||
{{$:/core/ui/UntaggedTemplate}}
|
||||
|
@ -1,6 +1,7 @@
|
||||
title: $:/core/ui/PageTemplate
|
||||
name: {{$:/language/PageTemplate/Name}}
|
||||
description: {{$:/language/PageTemplate/Description}}
|
||||
icon: $:/core/images/layout-button
|
||||
|
||||
\whitespace trim
|
||||
\import [[$:/core/ui/PageMacros]] [all[shadows+tiddlers]tag[$:/tags/Macro]!has[draft.of]]
|
||||
|
@ -3,10 +3,8 @@ title: $:/core/ui/UntaggedTemplate
|
||||
\define lingo-base() $:/language/SideBar/
|
||||
\whitespace trim
|
||||
<$button popup=<<qualify "$:/state/popup/tag">> class="tc-btn-invisible tc-untagged-label tc-tag-label">
|
||||
<<lingo Tags/Untagged/Caption>>
|
||||
<<lingo Tags/Untagged/Caption>>
|
||||
</$button>
|
||||
<$reveal state=<<qualify "$:/state/popup/tag">> type="popup" position="below">
|
||||
<div class="tc-drop-down">
|
||||
<$list filter="[untagged[]!is[system]] -[tags[]] +[sort[title]]" template="$:/core/ui/ListItemTemplate"/>
|
||||
</div>
|
||||
<$reveal class="tc-drop-down" tag="div" state=<<qualify "$:/state/popup/tag">> type="popup" position="below">
|
||||
<$list filter="[untagged[]!is[system]] -[tags[]] +[sort[title]]" template="$:/core/ui/ListItemTemplate"/>
|
||||
</$reveal>
|
||||
|
@ -1,6 +1,6 @@
|
||||
title: HelloThere
|
||||
|
||||
This is a demo of TiddlyWiki5 incorporating a plugin for the [[D3.js]] visualization library.
|
||||
This is a demo of TiddlyWiki5 incorporating a plugin for the [[D3.js]] visualisation library.
|
||||
|
||||
! Word Cloud
|
||||
|
||||
|
@ -1,7 +1,9 @@
|
||||
{
|
||||
"description": "Deutsche Basis Edition",
|
||||
"plugins": [
|
||||
"tiddlywiki/browser-sniff"],
|
||||
"tiddlywiki/browser-sniff",
|
||||
"tiddlywiki/internals"
|
||||
],
|
||||
"themes": [
|
||||
"tiddlywiki/vanilla",
|
||||
"tiddlywiki/snowwhite",
|
||||
@ -9,8 +11,7 @@
|
||||
"tiddlywiki/seamless",
|
||||
"tiddlywiki/centralised",
|
||||
"tiddlywiki/tight",
|
||||
"tiddlywiki/readonly",
|
||||
"tiddlywiki/internals"
|
||||
"tiddlywiki/readonly"
|
||||
],
|
||||
"languages": [
|
||||
"de-AT",
|
||||
|
@ -5,7 +5,7 @@ sectionnumber: 2
|
||||
tags: section doc
|
||||
title: Microkernel Architecture
|
||||
|
||||
This section describes the architecture of the ~TiddlyWiki-kernel. ~TiddlyWiki is based on a micro-kernel which provides only a small stack of functions. This design decision was made to introduce a cleaner mechanism for customization of ~TiddlyWiki. This section also describes the data-model of ~TiddlyWiki called tiddler. And it gives a overview to the modul system which developers can use to extend the functionality of the ~TiddlyWiki application.
|
||||
This section describes the architecture of the ~TiddlyWiki-kernel. ~TiddlyWiki is based on a micro-kernel which provides only a small stack of functions. This design decision was made to introduce a cleaner mechanism for customisation of ~TiddlyWiki. This section also describes the data-model of ~TiddlyWiki called tiddler. And it gives a overview to the module system which developers can use to extend the functionality of the ~TiddlyWiki application.
|
||||
|
||||
<$list filter="[!has[draft.of]has[chapter.of]chapter.of[Microkernel Architecture]tag[doc]sort[sub.num]]">
|
||||
|
||||
|
@ -5,6 +5,6 @@ sub.num: 3
|
||||
tags: doc
|
||||
title: Syncadaptor
|
||||
|
||||
A module with ``module-type: syncadaptor`` provides functionality to get a list of tiddlers (this list is provided as ~SkinnyTiddlers, which are normal tiddlers without the text field) and to load, save and delete single tiddlers. A syncadaptor can also provide functions to login and logout so that syncadaptor modules can be used to synchronize tiddlers with a remote server.
|
||||
A module with ``module-type: syncadaptor`` provides functionality to get a list of tiddlers (this list is provided as ~SkinnyTiddlers, which are normal tiddlers without the text field) and to load, save and delete single tiddlers. A syncadaptor can also provide functions to login and logout so that syncadaptor modules can be used to synchronise tiddlers with a remote server.
|
||||
|
||||
The syncer module only uses one syncadaptor and honours a special [[system tiddler|System Tiddlers]] [[$:/config/SyncFilter]] containing a [[filter string|Tags and Filter Mechanism]]. Tiddlers matching this filter string are saved to the server with a syncadapter. It uses the [[WebServer API|https://tiddlywiki.com/#WebServer%20API%3A%20Get%20All%20Tiddlers]] to load modified tiddlers from the server, which returns only non-system tiddlers.
|
||||
|
@ -27,10 +27,10 @@ On a different level, a tiddler is also the basic unit of work for the wiki user
|
||||
This makes sense for multiple reasons:
|
||||
Because the UI of TiddlyWiki is build from tiddlers, the wiki user is able to edit the interface of his own TiddlyWiki just by editing a wiki page.
|
||||
For example to add a list of tiddler links to the sidebar, the user just needs to create a new tiddler, put the links into this tiddler and tag this tiddler with ``$:/tags/SideBar``.
|
||||
This way the user can customize his work environment just by using mechanisms he already uses to manage his wiki pages.
|
||||
This way the user can customise his work environment just by using mechanisms he already uses to manage his wiki pages.
|
||||
Tiddlers consist of fields. When using a tiddler as wiki page, the user can use these fields to store meta information, like tags.
|
||||
|
||||
Because fields for metadata and especially tags are an easy way for the user to organize his wiki pages, TiddlyWiki provides a special filter mechanism to choose tiddlers using their metadata.
|
||||
Because fields for metadata and especially tags are an easy way for the user to organise his wiki pages, TiddlyWiki provides a special filter mechanism to choose tiddlers using their metadata.
|
||||
A filter string like ``[tag[learncard]topic[math]!tag[successful]]`` would filter all tiddlers tagged with "learncard", with the value "math" in the topic-field and are not tagged with "successful".
|
||||
A user could use this filter together with the ``<$list>`` widget to display a list of all math learncards which are not yet answered successfully in a wiki page.
|
||||
|
||||
|
@ -10,7 +10,7 @@ The most practical way to develop plugins is to use Node.js with the tiddlywiki5
|
||||
|
||||
!! 1. Installation
|
||||
|
||||
First read https://tiddlywiki.com/static/PluginMechanism.html.
|
||||
First read https://tiddlywiki.com/static/PluginMechanism.html.
|
||||
|
||||
Install Git from http://git-scm.com/downloads
|
||||
|
||||
@ -85,7 +85,7 @@ For example files see the plugins in the ~TiddlyWiki5 repository i.e. those loca
|
||||
|
||||
!!5. Build your files into a ~TiddlyWiki
|
||||
|
||||
Modify `editions/tw5.com/tiddlywiki.info` to include a reference to your plugin directory, i.e. find `"plugins": [ ` and add `"yourname/pluginname"`.
|
||||
Modify `editions/tw5.com/tiddlywiki.info` to include a reference to your plugin directory, i.e. find `"plugins": [ ` and add `"yourname/pluginname"`.
|
||||
|
||||
From the TW5 directory issue the command
|
||||
|
||||
|
@ -23,7 +23,7 @@ The boot kernel includes:
|
||||
* Several short shared utility functions
|
||||
* A handful of methods implementing the module mechanism
|
||||
* The `$tw.Tiddler` class (and field definition plugins)
|
||||
* The `$tw.Wiki` class (and tiddler deserialization methods)
|
||||
* The `$tw.Wiki` class (and tiddler deserialisation methods)
|
||||
* Code for the browser to load tiddlers from the HTML DOM
|
||||
* Code for the server to load tiddlers from the file system
|
||||
|
||||
|
@ -1,6 +1,7 @@
|
||||
{
|
||||
"description": "Spanish (Spain) edition",
|
||||
"plugins": [
|
||||
"tiddlywiki/internals"
|
||||
],
|
||||
"themes": [
|
||||
"tiddlywiki/vanilla",
|
||||
@ -9,8 +10,7 @@
|
||||
"tiddlywiki/seamless",
|
||||
"tiddlywiki/centralised",
|
||||
"tiddlywiki/tight",
|
||||
"tiddlywiki/readonly",
|
||||
"tiddlywiki/internals"
|
||||
"tiddlywiki/readonly"
|
||||
],
|
||||
"languages": [
|
||||
"es-ES"
|
||||
|
@ -1,6 +1,7 @@
|
||||
{
|
||||
"description": "French (France) edition",
|
||||
"plugins": [
|
||||
"tiddlywiki/internals"
|
||||
],
|
||||
"themes": [
|
||||
"tiddlywiki/vanilla",
|
||||
@ -9,8 +10,7 @@
|
||||
"tiddlywiki/seamless",
|
||||
"tiddlywiki/centralised",
|
||||
"tiddlywiki/tight",
|
||||
"tiddlywiki/readonly",
|
||||
"tiddlywiki/internals"
|
||||
"tiddlywiki/readonly"
|
||||
],
|
||||
"languages": [
|
||||
"fr-FR"
|
||||
|
@ -49,9 +49,6 @@
|
||||
],
|
||||
"build": {
|
||||
"index": [
|
||||
"--savetiddlers","[tag[external-image]]","images",
|
||||
"--setfield","[tag[external-image]]","_canonical_uri","$:/core/templates/canonical-uri-external-image","text/plain",
|
||||
"--setfield","[tag[external-image]]","text","","text/plain",
|
||||
"--rendertiddler","$:/core/save/all","index.html","text/plain"],
|
||||
"favicon": [
|
||||
"--savetiddler","$:/favicon.ico","favicon.ico",
|
||||
|
@ -1,6 +1,7 @@
|
||||
{
|
||||
"description": "Japanese (Japan) edition",
|
||||
"plugins": [
|
||||
"tiddlywiki/internals"
|
||||
],
|
||||
"themes": [
|
||||
"tiddlywiki/vanilla",
|
||||
@ -9,8 +10,7 @@
|
||||
"tiddlywiki/seamless",
|
||||
"tiddlywiki/centralised",
|
||||
"tiddlywiki/tight",
|
||||
"tiddlywiki/readonly",
|
||||
"tiddlywiki/internals"
|
||||
"tiddlywiki/readonly"
|
||||
],
|
||||
"languages": [
|
||||
"ja-JP"
|
||||
|
@ -1,4 +1,7 @@
|
||||
title: $:/DefaultTiddlers
|
||||
|
||||
[[HelloThere]]
|
||||
[[MarkdownExample]]
|
||||
$:/plugins/tiddlywiki/markdown
|
||||
[[MarkdownTutorial]]
|
||||
[[QuickDemo]]
|
||||
[[QuickDemo Source]]
|
||||
|
@ -1,11 +1,9 @@
|
||||
title: HelloThere
|
||||
|
||||
This is a demo of TiddlyWiki5 incorporating a plugin for parsing tiddlers written in the Markdown language. The plugin uses the [[Remarkable|https://github.com/jonschlinkert/remarkable]] Markdown parser internally. The MarkdownExample tiddler below is written in Markdown.
|
||||
This is a demo of TiddlyWiki5 incorporating a plugin for parsing tiddlers written in the Markdown language. The plugin uses the [[markdown-it|https://github.com/markdown-it/markdown-it]] Markdown parser internally. The MarkdownTutorial tiddler below is written in Markdown.
|
||||
|
||||
! Installation
|
||||
|
||||
To add the plugin to your own TiddlyWiki5, just drag this link to the browser window:
|
||||
|
||||
[[$:/plugins/tiddlywiki/markdown]]
|
||||
|
||||
{{$:/plugins/tiddlywiki/markdown/usage}}
|
||||
[[$:/plugins/tiddlywiki/markdown]]
|
@ -1,4 +1,4 @@
|
||||
title: MarkdownExample
|
||||
title: MarkdownTutorial
|
||||
type: text/x-markdown
|
||||
|
||||
Markdown: Basics
|
||||
@ -8,13 +8,13 @@ Getting the Gist of Markdown's Formatting Syntax
|
||||
------------------------------------------------
|
||||
|
||||
This page offers a brief overview of what it's like to use Markdown.
|
||||
The [syntax page] [s] provides complete, detailed documentation for
|
||||
The [syntax page][s] provides complete, detailed documentation for
|
||||
every feature, but Markdown should be very easy to pick up simply by
|
||||
looking at a few examples of it in action. The examples on this page
|
||||
are written in a before/after style, showing example syntax and the
|
||||
HTML output produced by Markdown.
|
||||
|
||||
It's also helpful to simply try Markdown out; the [Dingus] [d] is a
|
||||
It's also helpful to simply try Markdown out; the [Dingus][d] is a
|
||||
web application that allows you type your own Markdown-formatted text
|
||||
and translate it to XHTML.
|
||||
|
||||
@ -117,7 +117,7 @@ Output:
|
||||
|
||||
Unordered (bulleted) lists use asterisks, pluses, and hyphens (`*`,
|
||||
`+`, and `-`) as list markers. These three markers are
|
||||
interchangable; this:
|
||||
interchangeable; this:
|
||||
|
||||
* Candy.
|
||||
* Gum.
|
||||
@ -264,7 +264,7 @@ it easy to use Markdown to write about HTML example code:
|
||||
I strongly recommend against using any `<blink>` tags.
|
||||
|
||||
I wish SmartyPants used named entities like `—`
|
||||
instead of decimal-encoded entites like `—`.
|
||||
instead of decimal-encoded entities like `—`.
|
||||
|
||||
Output:
|
||||
|
||||
@ -273,7 +273,7 @@ Output:
|
||||
|
||||
<p>I wish SmartyPants used named entities like
|
||||
<code>&mdash;</code> instead of decimal-encoded
|
||||
entites like <code>&#8212;</code>.</p>
|
||||
entities like <code>&#8212;</code>.</p>
|
||||
|
||||
|
||||
To specify an entire block of pre-formatted code, indent every line of
|
220
editions/markdowndemo/tiddlers/QuickDemo.tid
Normal file
220
editions/markdowndemo/tiddlers/QuickDemo.tid
Normal file
@ -0,0 +1,220 @@
|
||||
title: QuickDemo
|
||||
type: text/markdown
|
||||
|
||||
<style>
|
||||
.tc-image-loaded {
|
||||
width: 35%;
|
||||
}
|
||||
</style>
|
||||
# h1 Heading
|
||||
## h2 Heading
|
||||
### h3 Heading
|
||||
#### h4 Heading
|
||||
##### h5 Heading
|
||||
###### h6 Heading
|
||||
|
||||
|
||||
## Horizontal Rules
|
||||
|
||||
____
|
||||
|
||||
---
|
||||
|
||||
****
|
||||
|
||||
|
||||
## Emphasis
|
||||
|
||||
|
||||
**This is bold text**
|
||||
|
||||
__This is bold text__
|
||||
|
||||
*This is italic text*
|
||||
|
||||
_This is italic text_
|
||||
|
||||
~~Strikethrough~~
|
||||
|
||||
|
||||
## Blockquotes
|
||||
|
||||
|
||||
> Blockquotes can also be nested...
|
||||
>> ...by using additional greater-than signs right next to each other...
|
||||
> > > ...or with spaces between arrows.
|
||||
|
||||
|
||||
## Unordered List
|
||||
|
||||
|
||||
+ Create a list by starting a line with `+`, `-`, or `*`
|
||||
+ Sub-lists are made by indenting 2 spaces:
|
||||
- Marker character change forces new list start:
|
||||
* Ac tristique libero volutpat at
|
||||
+ Facilisis in pretium nisl aliquet
|
||||
- Nulla volutpat aliquam velit
|
||||
+ Very easy!
|
||||
|
||||
|
||||
## Ordered List
|
||||
|
||||
|
||||
1. Lorem ipsum dolor sit amet
|
||||
2. Consectetur adipiscing elit
|
||||
3. Integer molestie lorem at massa
|
||||
|
||||
|
||||
1. You can use sequential numbers...
|
||||
1. ...or keep all the numbers as `1.`
|
||||
|
||||
Start numbering with offset:
|
||||
|
||||
57. foo
|
||||
1. bar
|
||||
|
||||
|
||||
## Code
|
||||
|
||||
|
||||
Inline `code`
|
||||
|
||||
Indented code
|
||||
|
||||
// Some comments
|
||||
line 1 of code
|
||||
line 2 of code
|
||||
line 3 of code
|
||||
|
||||
Block code "fences"
|
||||
|
||||
```
|
||||
Sample text here...
|
||||
```
|
||||
|
||||
|
||||
## Syntax highlighting
|
||||
|
||||
``` js
|
||||
var foo = function (bar) {
|
||||
return bar++;
|
||||
};
|
||||
|
||||
console.log(foo(5));
|
||||
```
|
||||
|
||||
|
||||
## ~KaTeX
|
||||
|
||||
|
||||
Equation $c = \pm\sqrt{a^2 + b^2}$ is typeset in inline mode.
|
||||
|
||||
Display style: $$c = \pm\sqrt{a^2 + b^2}$$
|
||||
|
||||
|
||||
## Tables
|
||||
|
||||
|
||||
| Attribute | Description |
|
||||
| --------- | ----------- |
|
||||
| multiple | select multiple files to download |
|
||||
| param | parameter to be passed with the message |
|
||||
| tooltip | optional tooltip text |
|
||||
|
||||
Aligning columns:
|
||||
|
||||
| Column A | Column B | Column C |
|
||||
| :---- | :----: | ----: |
|
||||
| is | is | is |
|
||||
| left | nicely | right |
|
||||
| aligned | centered | aligned |
|
||||
|
||||
|
||||
## Links
|
||||
|
||||
|
||||
[link text](http://google.com)
|
||||
|
||||
[link with title](http://nodeca.github.io/pica/demo/ "title text!")
|
||||
|
||||
link to tiddler [QuickDemo Source](#QuickDemo%20Source)
|
||||
|
||||
URL can contain spaces if enclosed in brackets `<>`: [QuickDemo Source](<#QuickDemo Source>)
|
||||
|
||||
|
||||
## Images
|
||||
|
||||
|
||||
![Minion](https://octodex.github.com/images/minion.png)
|
||||
![Stormtroopocat](https://octodex.github.com/images/stormtroopocat.jpg "The Stormtroopocat")
|
||||
|
||||
Like links, images also have a reference style syntax
|
||||
|
||||
![Alt text][id]
|
||||
|
||||
with a link reference defined later in the document.
|
||||
|
||||
[id]: https://octodex.github.com/images/dojocat.jpg "The Dojocat"
|
||||
|
||||
|
||||
## Subscript & Superscript
|
||||
|
||||
|
||||
- 19^th^
|
||||
- H~2~O
|
||||
|
||||
|
||||
## \<ins\>
|
||||
|
||||
|
||||
++Inserted text++
|
||||
|
||||
|
||||
## \<mark\>
|
||||
|
||||
|
||||
==Marked text==
|
||||
|
||||
|
||||
## Footnotes
|
||||
|
||||
|
||||
Footnote 1 link[^first].
|
||||
|
||||
Footnote 2 link[^second].
|
||||
|
||||
Inline footnote^[Text of inline footnote] definition.
|
||||
|
||||
Duplicated footnote reference[^second].
|
||||
|
||||
[^first]: Footnote **can have markup**
|
||||
|
||||
and multiple paragraphs.
|
||||
|
||||
[^second]: Footnote text.
|
||||
|
||||
|
||||
## Definition Lists
|
||||
|
||||
|
||||
Term 1
|
||||
|
||||
: Definition 1
|
||||
with lazy continuation.
|
||||
|
||||
Term 2 with *inline markup*
|
||||
|
||||
: Definition 2
|
||||
|
||||
{ some code, part of Definition 2 }
|
||||
|
||||
Third paragraph of definition 2.
|
||||
|
||||
_Compact style:_
|
||||
|
||||
Term 1
|
||||
~ Definition 1
|
||||
|
||||
Term 2
|
||||
~ Definition 2a
|
||||
~ Definition 2b
|
5
editions/markdowndemo/tiddlers/QuickDemoSource.tid
Normal file
5
editions/markdowndemo/tiddlers/QuickDemoSource.tid
Normal file
@ -0,0 +1,5 @@
|
||||
title: QuickDemo Source
|
||||
|
||||
<$let tiddler="QuickDemo">
|
||||
<$codeblock code={{{ [<tiddler>get[text]] }}} language={{{ [<tiddler>get[type]else[text/vnd.tiddlywiki]] }}}/>
|
||||
</$let>
|
@ -1,7 +1,9 @@
|
||||
{
|
||||
"description": "Demo of the Markdown plugin",
|
||||
"plugins": [
|
||||
"tiddlywiki/markdown"
|
||||
"tiddlywiki/markdown",
|
||||
"tiddlywiki/highlight",
|
||||
"tiddlywiki/katex"
|
||||
],
|
||||
"themes": [
|
||||
"tiddlywiki/vanilla",
|
||||
|
@ -15,7 +15,7 @@ You can have multiple template tiddlers that use the same input and options tidd
|
||||
|
||||
!!Display tiddler
|
||||
|
||||
This is the container used to display the section in the résumé itself, there isn't any customization here.
|
||||
This is the container used to display the section in the résumé itself, there isn't any customisation here.
|
||||
|
||||
''Required tags'': `Section Display`<br>
|
||||
''Required name format'': `$:/display/(section name) Display`<br>
|
||||
|
@ -268,7 +268,7 @@ describe("Widget module", function() {
|
||||
expect(wrapper.innerHTML).toBe("<p>Happy Result</p>");
|
||||
|
||||
// This is important. $Let needs to be aware enough not to let its
|
||||
// own variables interfere with its ability to recognize no change.
|
||||
// own variables interfere with its ability to recognise no change.
|
||||
// Doesn't matter that nothing has changed, we just need to make sure
|
||||
// it recognizes that that its outward facing variables are unchanged
|
||||
// EVEN IF some intermediate variables did change, there's no need to
|
||||
|
@ -1,8 +1,9 @@
|
||||
created: 20210101162308245
|
||||
modified: 20210101201435693
|
||||
modified: 20230110220417543
|
||||
tags: [[Community Editions]]
|
||||
title: "TiddlyResearch" by Kebi
|
||||
url: https://kebifurai.github.io/TiddlyResearch/
|
||||
title: "TiddlyStudy" by Kebi
|
||||
type: text/vnd.tiddlywiki
|
||||
url: https://postkevone.github.io/tiddlystudy/
|
||||
|
||||
A adaptation of TiddlyWiki perfect for using as a Notebook sysetem.
|
||||
|
@ -1,7 +1,7 @@
|
||||
title: Open Collective
|
||||
modified: 20221204165636777
|
||||
created: 20221204165636777
|
||||
tags: About HelloThere [[Open Collective]]
|
||||
tags: About HelloThere
|
||||
|
||||
Open Collective is a platform for transparent fundraising and expenses for projects like TiddlyWiki. It is the official TiddlyWiki community fundraising space.
|
||||
|
||||
|
@ -0,0 +1,6 @@
|
||||
title: TiddlyWiki Newsletter
|
||||
|
||||
Subscribe to the ~TiddlyWiki Newsletter here:
|
||||
|
||||
<iframe src="https://tiddlywiki.substack.com/embed" width="480" height="320" style="border:1px solid #EEE; background:white;" frameborder="0" scrolling="no"></iframe>
|
||||
|
@ -1,15 +1,16 @@
|
||||
created: 20210101161529206
|
||||
modified: 20210101201435693
|
||||
modified: 20230110220010665
|
||||
tags: [[Community Editions]]
|
||||
title: "Drift - Collect, Organise, Grow." by Tony K
|
||||
url: https://akhater.github.io/drift/
|
||||
type: text/vnd.tiddlywiki
|
||||
url: https://github.com/bmann/drift-tiddlywiki-template/tree/master/drift
|
||||
|
||||
A adaptation of TiddlyWiki perfect for using as a Notebook sysetem.
|
||||
|
||||
{{!!url}}
|
||||
|
||||
<<<
|
||||
Drift is an adaptation of TiddlyWiki with the goal of helping you Collect. Organize. and Grow. your ideas while keeping tab on how they interconnect together and fluidly Drift from one to another.
|
||||
Drift is an adaptation of TiddlyWiki with the goal of helping you Collect. Organise. and Grow. your ideas while keeping tab on how they interconnect together and fluidly Drift from one to another.
|
||||
|
||||
The 2 main components of Drift are TWCrosslinks and DailyNotes so you never miss an idea
|
||||
|
||||
|
@ -11,7 +11,7 @@ title: "Noteself" by Danielo Rodríguez
|
||||
type: text/vnd.tiddlywiki
|
||||
url: https://noteself.github.io/
|
||||
|
||||
~NoteSelf is your personal, private, customizable, Evernote-like experience.
|
||||
~NoteSelf is your personal, private, customisable, Evernote-like experience.
|
||||
You want cloud? Fine! You don't? Fine too! It's all yours, It's your decision!
|
||||
Why not be a bit selfish?
|
||||
|
||||
@ -26,9 +26,9 @@ You already know and love Evernote, we know it. It is comfortable, it syncs, has
|
||||
Wow, it's almost perfect, but what about:
|
||||
|
||||
* Privacy - Everything is stored on the Evernote's servers!
|
||||
* Customization - If you don't like the interface of Evernote, there's nothing you can do
|
||||
* Customisation - If you don't like the interface of Evernote, there's nothing you can do
|
||||
|
||||
~NoteSelf is built on top of ~TiddlyWiki, a powerful, free, highly customizable and open-source personal wiki.
|
||||
We took the best of it, it's powerful customization system, and mixed it with one of the best
|
||||
embedded databases available, [[PouchDb|http://www.pouchdb.com]], for bringing the synchronization capabilities you need.
|
||||
~NoteSelf is built on top of ~TiddlyWiki, a powerful, free, highly customisable and open-source personal wiki.
|
||||
We took the best of it, it's powerful customisation system, and mixed it with one of the best
|
||||
embedded databases available, [[PouchDb|http://www.pouchdb.com]], for bringing the synchronisation capabilities you need.
|
||||
<<<
|
||||
|
@ -11,7 +11,7 @@ A thesis notebook based on TiddlyWiki.
|
||||
<<<
|
||||
This is an example of a thesis notebook powered by TiddlyWiki 5.0.8-beta.
|
||||
|
||||
TiddlyWiki is a great piece of software created by Jeremy Ruston. It allows you, among other things, to take notes, organize ideas, store information, and display all your stuff the way you want. It is an incredibly flexible tool you can adapt to fit almost all your needs.
|
||||
TiddlyWiki is a great piece of software created by Jeremy Ruston. It allows you, among other things, to take notes, organise ideas, store information, and display all your stuff the way you want. It is an incredibly flexible tool you can adapt to fit almost all your needs.
|
||||
|
||||
This TiddlyWiki has been customized to serve as a philosophy notebook centered around authors, books and papers, concepts and theories, and personal notes. I use it along with Zotero, which is a dedicated bibliography software. Both are free, open source projects. TiddlyWiki can be downloaded at https://tiddlywiki.com.
|
||||
<<<
|
||||
|
@ -12,11 +12,11 @@ A collection of plugins from TheDiveO.
|
||||
[[TheDiveO's Third Flow|http://thediveo.github.io/ThirdFlow/]] plugin construction system:
|
||||
|
||||
<<<
|
||||
The ~ThirdFlow plugin brings to you another way to develop customization plugins for TiddlyWiki 5. It is not enforcing a specific development flow, it simply tries to help you. Otherwise, it tries to stay out of your way.
|
||||
The ~ThirdFlow plugin brings to you another way to develop customisation plugins for TiddlyWiki 5. It is not enforcing a specific development flow, it simply tries to help you. Otherwise, it tries to stay out of your way.
|
||||
<<<
|
||||
|
||||
[[TheDiveO's FontAwesome|http://thediveo.github.io/TW5FontAwesome/]] plugin:
|
||||
|
||||
<<<
|
||||
The FontAwesome plugin supports embedding Font Awesome in TiddlyWiki 5. There is no need to install this font into your operating system in order to use it with TiddlyWiki 5. The font is already embedded in this TiddlyWiki 5 customization plugin instead, so nothing else to install.
|
||||
The FontAwesome plugin supports embedding Font Awesome in TiddlyWiki 5. There is no need to install this font into your operating system in order to use it with TiddlyWiki 5. The font is already embedded in this TiddlyWiki 5 customisation plugin instead, so nothing else to install.
|
||||
<<<
|
||||
|
@ -9,7 +9,7 @@ Shiraz plugin is a very small in size and framework to create stylish contents i
|
||||
|
||||
{{!!url}}
|
||||
|
||||
Shiraz plugin contains extended markups, macros, styles, and many customization to empty Tiddlywiki and can be used as a ''starter kit''.
|
||||
Shiraz plugin contains extended markups, macros, styles, and many customisation to empty Tiddlywiki and can be used as a ''starter kit''.
|
||||
|
||||
Some of Shiraz features are:
|
||||
|
||||
@ -18,7 +18,7 @@ Some of Shiraz features are:
|
||||
* Sortable tables
|
||||
* Display on demand, slider, and details
|
||||
* Images, basic image macros, slidein, and overlay images, polaroid and pretty images
|
||||
* Table customization tools
|
||||
* Table customisation tools
|
||||
* Sticky footer
|
||||
* Multi columns tiddler
|
||||
* Multi column story river
|
||||
|
@ -11,8 +11,8 @@ An interactive network visualisation plugin based on [[Vis.js|http://visjs.org]]
|
||||
~TiddlyMap is a TiddlyWiki plugin that allows you to link your wiki-topics (tiddlers) in order to create clickable graphs. By creating relations between your topics you can easily do the following:
|
||||
|
||||
* Create concept maps and quickly manifest your ideas in tiddlers.
|
||||
* Create task-dependency graphs to organize and describe your tasks.
|
||||
* Visualize your topic structures to get an immediate grasp of topics and relations.
|
||||
* Create task-dependency graphs to organise and describe your tasks.
|
||||
* Visualise your topic structures to get an immediate grasp of topics and relations.
|
||||
|
||||
In general you may create, visualize and describe any network-structure you have in mind.
|
||||
In general you may create, visualise and describe any network-structure you have in mind.
|
||||
<<<
|
||||
|
@ -10,5 +10,5 @@ An early release of an edition of TiddlyWiki customised for rigorous, academic n
|
||||
{{!!url}}
|
||||
|
||||
<<<
|
||||
TiddlyWiki for Scholars is a personal customization of TiddlyWiki 5.0.13-beta I made for note-taking from readings, but it can be useful for other purposes. The idea behind this adaptation is to show and to allow creating relevant data related to the current tiddler without leaving the tiddler.
|
||||
TiddlyWiki for Scholars is a personal customisation of TiddlyWiki 5.0.13-beta I made for note-taking from readings, but it can be useful for other purposes. The idea behind this adaptation is to show and to allow creating relevant data related to the current tiddler without leaving the tiddler.
|
||||
<<<
|
||||
|
@ -13,4 +13,4 @@ Tiddlyshow contains the following features
|
||||
|
||||
* Tools for preparing slides
|
||||
* Shortcut keys for navigation (forward and backward)
|
||||
* Themes to colorify and customize the slideshow
|
||||
* Themes to colorify and customise the slideshow
|
||||
|
@ -9,6 +9,6 @@ Todolist is a small pure wikitext plugin, contain all tools to work with todo l
|
||||
|
||||
{{!!url}}
|
||||
|
||||
With Todolist, easily organize and prioritize your tasks and projects so you’ll always know exactly what to work on next.
|
||||
With Todolist, easily organise and prioritise your tasks and projects so you’ll always know exactly what to work on next.
|
||||
|
||||
Todolist creates custom UI and lets you to add new items, set priority, done/undone items, archive, delete. Using Todolist plugin it is possible to create several todo lists in one Tiddlywiki.
|
||||
|
@ -5,7 +5,7 @@ title: "Slides and Stories" by Jan
|
||||
type: text/vnd.tiddlywiki
|
||||
url: http://slidesnstories.tiddlyspot.com
|
||||
|
||||
Slides and Stories is a repository of the tools to optimize TW for scientific research and for presenting and publishing results.
|
||||
Slides and Stories is a repository of the tools to optimise TW for scientific research and for presenting and publishing results.
|
||||
|
||||
{{!!url}}
|
||||
|
||||
|
@ -12,5 +12,5 @@ A collection of customisations and macros from Danielo Rodriguez.
|
||||
<<<
|
||||
This is my personal tiddlywiki file for testing.
|
||||
|
||||
Here I will post the tools and Macros that I develop for this awesome tool. That way, all the help the comunity gave me can came back to the comunity again.
|
||||
Here I will post the tools and Macros that I develop for this awesome tool. That way, all the help the community gave me can came back to the community again.
|
||||
<<<
|
||||
|
@ -5,14 +5,14 @@ title: Semantic Colors by Mohammad
|
||||
type: text/vnd.tiddlywiki
|
||||
url: https://kookma.github.io/TW-Semantic-Colors/
|
||||
|
||||
Semantic colors are set of CSS to apply colorful theme to individual tiddlers for categorization purpose.
|
||||
Semantic colors are set of CSS to apply colorful theme to individual tiddlers for categorisation purpose.
|
||||
|
||||
{{!!url}}
|
||||
|
||||
Tiddlywiki "semantic colors" has two objectives:
|
||||
|
||||
# How it is simply possible to apply theme to an individual tiddler
|
||||
# Use semantic colors for categorization
|
||||
# Use semantic colors for categorisation
|
||||
|
||||
;Some use cases
|
||||
:Learning materials (each topic, category can have dedicated semantic color, like learning a foreign language)
|
||||
|
@ -20,7 +20,7 @@ I've been using TiddlyWiki5 with Google Firebase for over a year now. It's stabl
|
||||
|
||||
Please consider this version a proof of concept rather than a polished product! My focus was on multi-device or small-team collaboration:
|
||||
|
||||
* Basic authorization (bags have an access policy determining who can read / write them).
|
||||
* Basic authorisation (bags have an access policy determining who can read / write them).
|
||||
* Multiple wikis can be hosted under a single firebase account.
|
||||
* It uses Firebase's built-in social auth to log in users.
|
||||
* Tiddlers are written individually with locking, preventing users overwriting each others' updates.
|
||||
|
@ -18,7 +18,7 @@ An extension to the Node.js configuration of TiddlyWiki that adds support for st
|
||||
<<<
|
||||
TiddlyServer 2.0 takes the server command of TiddlyWiki on NodeJS and adds it to a static file server. This means you can load and serve any TiddlyWiki data folder in the same way you can serve a single file TiddlyWiki.
|
||||
|
||||
But you don't need to serve files and folders from just one place, you can serve them from multiple places anywhere on your harddrive (literally anywhere NodeJS can stat, readdir, and readFile). You can even organize them into virtual folders (aka aliases in Apache and mounts in Express).
|
||||
But you don't need to serve files and folders from just one place, you can serve them from multiple places anywhere on your harddrive (literally anywhere NodeJS can stat, readdir, and readFile). You can even organise them into virtual folders (aka aliases in Apache and mounts in Express).
|
||||
|
||||
The main point, of course, is that you can actually edit your files, not just look at them. Single file TiddlyWikis use the put saver, which needs to be patched using a bookmarklet included on the index page. The instructions for this are below under the heading "One thing that needs to be noted".
|
||||
|
||||
|
@ -5,7 +5,7 @@ title: "Dropboard" by Reid Gould
|
||||
type: text/vnd.tiddlywiki
|
||||
url: https://github.com/reidgould/tiddlywiki-dropboard
|
||||
|
||||
A TiddlyWiki plugin for kanban-like organization in the style of Trello™ using boards, lists, and cards.
|
||||
A TiddlyWiki plugin for kanban-like organisation in the style of Trello™ using boards, lists, and cards.
|
||||
|
||||
{{!!url}}
|
||||
|
||||
|
@ -21,7 +21,7 @@ Relative coordinates are expressed in the form ''(x,y,w,h)''. Where ''x'' and ''
|
||||
|
||||
!! Absolute coordinate system
|
||||
|
||||
The relative coordinate system works flawless most of the time. Problems occure if the target element (for example, a popup) and the source element (the triggering button) do not share the same positioned ancherstor element. This is often the case if the popup is declared outside a table and the triggering button is declared within a table cell. In this case the coordiante systems have different origins and the popup will be displayed in the wrong location.
|
||||
The relative coordinate system works flawless most of the time. Problems occure if the target element (for example, a popup) and the source element (the triggering button) do not share the same positioned ancestor element. This is often the case if the popup is declared outside a table and the triggering button is declared within a table cell. In this case the coordinate systems have different origins and the popup will be displayed in the wrong location.
|
||||
|
||||
Absolute coordinates can fix this problem by using the root element of the page (the upper-left corner of the page) as the origin of the coordinate system. Absolute coordinates are expressed in the form ''@(x,y,w,h)''. Where ''x'' and ''y'' represent the position and ''w'' and ''h'' the width and height of the element. The leading ''@''-symbol marks these coordinates as absolute.
|
||||
|
||||
@ -30,7 +30,7 @@ The ButtonWidget has an option (''popupAbsCoords'') to put absolute coordinates
|
||||
|
||||
!! Example
|
||||
|
||||
The following example shows a popup that is triggerd from within a table cell. The table cell is the nearest positioned ancestor element. The popup was defined outside the table cell. The button using relative coordinates will open the popup in the wrong location because the button and the popup do not agree on the same coordinate system. Using absolute coordinates fixes this problem.
|
||||
The following example shows a popup that is triggered from within a table cell. The table cell is the nearest positioned ancestor element. The popup was defined outside the table cell. The button using relative coordinates will open the popup in the wrong location because the button and the popup do not agree on the same coordinate system. Using absolute coordinates fixes this problem.
|
||||
|
||||
<<wikitext-example-without-html '<$reveal type="popup" state="$:/state/CoordinateSampleReveal">
|
||||
<div class="tc-drop-down">
|
||||
|
@ -1,5 +1,5 @@
|
||||
created: 20150219175930000
|
||||
modified: 20230107165037493
|
||||
modified: 20230117112239663
|
||||
tags: Concepts [[WikiText Parser Modes]]
|
||||
title: Pragma
|
||||
type: text/vnd.tiddlywiki
|
||||
@ -19,4 +19,6 @@ The following pragmas are available:
|
||||
;`\whitespace trim` or `\whitespace notrim`
|
||||
: <<.from-version "5.1.15">> Control whether whitespace is trimmed from the start and end of text runs (the default is ''notrim''). This setting can be useful when the whitespace generated by linebreaks disturbs formatting
|
||||
;`\import <filter-expression>`
|
||||
: <<.from-version "5.1.18">> for importing macro definitions from tiddlers identified by a filter expression
|
||||
: <<.from-version "5.1.18">> Import macro definitions from tiddlers identified by a filter expression
|
||||
;`\parsermode block` or `\parsermode inline`
|
||||
: <<.from-version "5.2.4">> Adjust whether the remaining text is parsed in block mode or inline mode.
|
@ -3,4 +3,4 @@ tags: Concepts
|
||||
|
||||
Groups of uniquely titled tiddlers are contained in WikiStore objects.
|
||||
|
||||
The WikiStore also manages the plugin modules used for widgets, and operations like serializing, deserializing, parsing and rendering tiddlers.
|
||||
The WikiStore also manages the plugin modules used for widgets, and operations like serialising, deserialising, parsing and rendering tiddlers.
|
||||
|
@ -4,7 +4,7 @@ tags: Definitions
|
||||
title: GitHub
|
||||
type: text/vnd.tiddlywiki
|
||||
|
||||
GitHub is a hosting service for distributed projects that use git as their version-control system. It allows free hosting and management of open-source projects and facilitates collaborative developement on the source code. Using GitHub for non-open-source endeavors requires additional fees.
|
||||
GitHub is a hosting service for distributed projects that use git as their version-control system. It allows free hosting and management of open-source projects and facilitates collaborative development on the source code. Using GitHub for non-open-source endeavours requires additional fees.
|
||||
|
||||
The code and documentation of TiddlyWiki is hosted on GitHub at:
|
||||
|
||||
|
@ -6,7 +6,7 @@ type: text/vnd.tiddlywiki
|
||||
|
||||
Modals (or "wizards") fade the main TiddlyWiki window to display an isolated tiddler that must be explicitly dismissed by the user.
|
||||
|
||||
The tiddler to be displayed can contain the following optional fields that are used to customize the modal:
|
||||
The tiddler to be displayed can contain the following optional fields that are used to customise the modal:
|
||||
|
||||
|!Field |!Description |
|
||||
|footer|The footer text for the modal|
|
||||
|
@ -32,7 +32,7 @@ Note that within the subfilter, the "currentTiddler" variable is set to the titl
|
||||
|
||||
<<.tip "Compare with the similar [[subfilter|subfilter Operator]] operator which runs a subfilter and directly returns the results">>
|
||||
|
||||
<<.tip "Compare with the analagous named filter run prefix `:filter`">>
|
||||
<<.tip "Compare with the analogous named filter run prefix `:filter`">>
|
||||
|
||||
```
|
||||
\define larger-than-1k() [get[text]length[]compare:integer:gteq[1000]]
|
||||
|
@ -4,7 +4,7 @@ tags: [[Filter Operators]] [[Special Operators]]
|
||||
title: getvariable Operator
|
||||
caption: getvariable
|
||||
op-purpose: select all values of variables named in the input titles
|
||||
op-input: a selection of varible names
|
||||
op-input: a selection of variable names
|
||||
op-parameter: ignored
|
||||
op-output: the values of each of the variables named in the input titles (or blank if the variable is not defined)
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
created: 20140410103123179
|
||||
modified: 20150203185150000
|
||||
modified: 20221229094244039
|
||||
tags: [[Filter Operators]]
|
||||
title: indexes Operator
|
||||
type: text/vnd.tiddlywiki
|
||||
@ -9,8 +9,10 @@ op-input: a [[selection of titles|Title Selection]]
|
||||
op-parameter: none
|
||||
op-output: all the property names or indices contained in the input data tiddlers
|
||||
|
||||
Each input title is processed in turn, and is ignored if it does not denote a [[data tiddler|DataTiddlers]]. The list of property names is retrieved from the data tiddler (in no particular order) and then [[dominantly appended|Dominant Append]] to the operator's output.
|
||||
Each input title is processed in turn, and is ignored if it does not denote a [[data tiddler|DataTiddlers]]. The sorted list of property names is retrieved from the data tiddler and then [[dominantly appended|Dominant Append]] to the operator's output.
|
||||
|
||||
Where a tiddler's [[content is JSON|JSONTiddlers]] with an array as its root, the <<.op indexes>> operator retrieves a selection of integer indices instead.
|
||||
Note that behind the scenes, the name/value pairs in a dictionary tiddler are represented as a [[JSON object|JSONTiddlers]]. JSON objects do not maintain a guaranteed ordering and so we can’t reliably retain the ordering of the data in the file.
|
||||
|
||||
Where the content of a tiddler is in JSON format with an array as its root, the <<.op indexes>> operator retrieves a selection of integer indices instead.
|
||||
|
||||
<<.operator-examples "indexes">>
|
||||
|
@ -33,6 +33,8 @@ If <<.place C>> is anything else an error message is returned. <<.from-version "
|
||||
|
||||
When <<.op is[missing]>> is the first operator in a [[run|Filter Run]], its output is always empty. And when <<.op is[shadow]>> comes first, it outputs only those shadow tiddlers that have been overridden. This is because the [[initial input to a run|Filter Expression]] contains only <<.em non>>-shadow tiddlers.
|
||||
|
||||
The <<.olink all>> operator is similar, but its scope is the whole wiki.
|
||||
<<.tip "Use `has[title]` to match any tiddler title that is either a tiddler //or// a shadow tiddler.">>
|
||||
|
||||
<<.operator-examples "is">>
|
||||
The <<.olink all>> operator is similar to <<.olink is>>, but its scope is the whole wiki.
|
||||
|
||||
<<.operator-examples "is">>
|
||||
|
@ -33,7 +33,7 @@ If the <<.op reduce>> operator receives no input, its output will be empty. The
|
||||
</$set>
|
||||
```
|
||||
|
||||
<<.tip "Compare with the analagous named [[filter run prefix|Filter Expression]] `:reduce`">>
|
||||
<<.tip "Compare with the analogous named [[filter run prefix|Filter Expression]] `:reduce`">>
|
||||
|
||||
```
|
||||
\define num-items() [get[quantity]add<accumulator>]
|
||||
|
@ -32,7 +32,7 @@ Unlike conventional online services, TiddlyWiki lets you choose where to keep yo
|
||||
{{$:/core/images/twitter}} Twitter
|
||||
</a>
|
||||
<a rel="me" href="https://fosstodon.org/@TiddlyWiki" class="tc-btn-big-green" style="border-radius:4px;background-color:#2b90d9;" target="_blank" rel="noopener noreferrer">
|
||||
{{$:/core/images/globe}} Mastodon
|
||||
{{$:/core/images/mastodon}} Mastodon
|
||||
</a>
|
||||
<a href="https://github.com/Jermolene/TiddlyWiki5" class="tc-btn-big-green" style="border-radius:4px;background-color:#444;" target="_blank" rel="noopener noreferrer">
|
||||
{{$:/core/images/github}} ~GitHub
|
||||
|
@ -1,5 +1,5 @@
|
||||
created: 20150414070451144
|
||||
list: [[HelloThumbnail - Introduction Video]] [[HelloThumbnail - Grok TiddlyWiki]] [[HelloThumbnail - Latest Version]] [[HelloThumbnail - TiddlyWikiLinks]] [[HelloThumbnail - Developers]] [[HelloThumbnail - Funding]] [[HelloThumbnail - Marketplace]] [[HelloThumbnail - Federatial]]
|
||||
list: [[HelloThumbnail - Newsletter]] [[HelloThumbnail - Introduction Video]] [[HelloThumbnail - Grok TiddlyWiki]] [[HelloThumbnail - Latest Version]] [[HelloThumbnail - TiddlyWikiLinks]] [[HelloThumbnail - Developers]] [[HelloThumbnail - Funding]] [[HelloThumbnail - Marketplace]] [[HelloThumbnail - Federatial]]
|
||||
modified: 20150414070948246
|
||||
title: HelloThumbnail
|
||||
type: text/vnd.tiddlywiki
|
||||
|
@ -0,0 +1,9 @@
|
||||
title: HelloThumbnail - Newsletter
|
||||
tags: HelloThumbnail
|
||||
caption: ~TiddlyWiki Newsletter
|
||||
link: TiddlyWiki Newsletter
|
||||
image: TiddlyWiki Newsletter Badge.png
|
||||
color: #fff
|
||||
ribbon-text: NEW
|
||||
|
||||
Subscribe to the ~TiddlyWiki Newsletter, a fortnightly summary of the most interesting and relevant news from the ~TiddlyWiki community
|
@ -1,27 +1,59 @@
|
||||
created: 20160618090057124
|
||||
modified: 20190704054958185
|
||||
modified: 20230101114932775
|
||||
tags: [[Editor toolbar]]
|
||||
title: Using Stamp
|
||||
type: text/vnd.tiddlywiki
|
||||
|
||||
! Insert snippets
|
||||
You can insert preconfigured snippets of text to use stamp from toolbar. Click ''stamp'' (<<.icon $:/core/images/stamp>>) and just select a snippet.
|
||||
Snippets are pre-configured snippets of text which can be inserted into the editor by clicking the ''stamp'' (<<.icon $:/core/images/stamp>>) button on the [[toolbar|Editor toolbar]] and then on the required item.
|
||||
|
||||
Snippets can either ''replace'', or be ''added before and/or after'', the selected text in the editor.
|
||||
|
||||
! Create a snippet
|
||||
# Click ''stamp'' (<<.icon $:/core/images/stamp>>)
|
||||
# Create a snippet tiddler through the "//Add your own//" menu entry
|
||||
# Type some text as snippet for the tiddler, add a caption for the name as shown in the menu
|
||||
# Click the <<.icon $:/core/images/done-button>> ''ok'' button
|
||||
!! Whilst editing a tiddler
|
||||
|
||||
<$macrocall $name=".tip" _="""''Tip:'' You can also create a snippet tiddler using the ''new tiddler'' <<.icon $:/core/images/new-button>> button in the sidebar, and add tag ''~$:/tags/TextEditor/Snippet''""" />
|
||||
# Click ''stamp'' (<<.icon $:/core/images/stamp>>) on the toolbar
|
||||
# Click "//Add your own//" at the bottom of the menu
|
||||
# Type the text for the snippet in the editor
|
||||
# Enter the caption for the snippet menu item in the `caption` field
|
||||
# Click the <<.icon $:/core/images/done-button>> //Confirm changes to this tiddler// button
|
||||
|
||||
!!<<.from-version "5.1.20">> Adding a prefix and/or suffix to a selection
|
||||
!! Manually
|
||||
|
||||
# Click ''stamp'' (<<.icon $:/core/images/stamp>>)
|
||||
# Create a snippet tiddler through the "//Add your own//" menu entry
|
||||
# Add a caption for the name as shown in the menu
|
||||
# Create a tiddler with the same title but add the suffix `/prefix`
|
||||
# Insert the prefix in its text field
|
||||
# Create a tiddler with the same title but add the suffix `/suffix`
|
||||
# Insert the suffix in its text field
|
||||
# Click the <<.icon $:/core/images/done-button>> ''ok'' button
|
||||
# Create a new tiddler by clicking the //Create a new tiddler// <<.icon $:/core/images/new-button>> button in the sidebar
|
||||
|
||||
# Change the title for the tiddler (from e.g. `New Tiddler 1`). The tiddler title determines the menu item for the stamp if you do not set a `caption` field (see below).<div><$macrocall $name=".tip" _="""''Pro tip'' Set a title like `$:/yourusername/snippets/My new stamp` to 'file' your new tiddler away as a [[system tiddler|SystemTiddlers]] which doesn't appear in the normal search results """ /></div>
|
||||
|
||||
# Add the tag <<tag-pill $:/tags/TextEditor/Snippet>> by entering `$:/tags/TextEditor/Snippet` in the `tag name` tag box and clicking //Add// (or pressing the //Enter// key)
|
||||
|
||||
# Enter the snippet content (which you wish to appear in the editor when you click the stamp menu <<.icon $:/core/images/stamp>>) in the editor
|
||||
|
||||
# Create a field with the name `caption` and value set to the text for the snippet's stamp menu item:
|
||||
## Enter `caption` in the //Add new field// `field name` box
|
||||
## Enter the stamp menu item caption in the `field value` box
|
||||
|
||||
|
||||
|
||||
! Re-ordering snippets
|
||||
Your new snippet will appear at the bottom of the stamp menu by default. To adjust the order of snippets:
|
||||
|
||||
# Navigate to a snippet tiddler
|
||||
# Click the <<tag $:/tags/TextEditor/Snippet>> tag pill
|
||||
# Drag items up and down the menu of snippets
|
||||
|
||||
|
||||
! Adding a prefix and/or suffix to a selection <span style="font-size:1rem;"><<.from-version "5.1.20">></span>
|
||||
|
||||
By default, the stamp button ''replaces ''text you have selected in the editor (let's say `selectedText`)with your snippet (let's say `$:/my/snippet`).
|
||||
|
||||
If instead of //replacing// selected text, you wish the stamp button to //add// [[wikitext |WikiText]] before and/or after the selection:
|
||||
|
||||
# Create a snippet tiddler (tagged <<tag-pill $:/tags/TextEditor/Snippet>>, with `caption` field set to desired stamp menu item text) using either of the two methods above
|
||||
# Create a new tiddler with either `/prefix` or `/suffix` appended to the end of the snippet tiddler's title, according to whether you wish the stamp to insert the snippet content //before //(`/prefix`) or //after //(`/suffix`) the text selected in the editor.
|
||||
#* Do not tag the tiddler <<tag-pill $:/tags/TextEditor/Snippet>>; the caption field is ignored
|
||||
#* Set the tiddler text to the text you wish to be inserted before or after your selection
|
||||
|
||||
|Example configuration for `snippet2` with prefix+suffix|c
|
||||
|!Tiddler|!Tiddler content|!Tag|!`caption` field|
|
||||
|`$:/snip/snippet2`||<<tag-pill $:/tags/TextEditor/Snippet>>|`My second stamp menu item`|
|
||||
|`$:/snip/snippet2/prefix`|`TextIWantPrependedToSelection`|||
|
||||
|`$:/snip/snippet2/suffix`|`TextIWantAppendedToSelection`|||
|
||||
|
BIN
editions/tw5.com/tiddlers/images/TiddlyWiki Newsletter Badge.png
Normal file
BIN
editions/tw5.com/tiddlers/images/TiddlyWiki Newsletter Badge.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 170 KiB |
@ -0,0 +1,3 @@
|
||||
title: TiddlyWiki Newsletter Badge.png
|
||||
type: image/png
|
||||
tags: picture
|
@ -1,13 +1,13 @@
|
||||
caption: changecount
|
||||
created: 20131228162825226
|
||||
modified: 20150221151223000
|
||||
modified: 20221221174529586
|
||||
tags: Macros [[Core Macros]]
|
||||
title: changecount Macro
|
||||
type: text/vnd.tiddlywiki
|
||||
caption: changecount
|
||||
|
||||
The <<.def changecount>> [[macro|Macros]] returns the number of times the [[current tiddler|Current Tiddler]] has been created, stored or deleted during the current ~TiddlyWiki session.
|
||||
|
||||
If a tiddler is deleted and subsequently recreated, its <<.var changecount>> will go up by two.
|
||||
If a tiddler is deleted and subsequently recreated, its <<.var changecount>> will be increased by two.
|
||||
|
||||
!! Parameters
|
||||
|
||||
|
@ -16,7 +16,7 @@ Note: Each first [[step|Filter Step]] of a [[filter run|Filter Run]] not given a
|
||||
;filter
|
||||
: A [[filter|Filters]] selecting which tiddlers to include
|
||||
;caption
|
||||
: The name of the field to transclude for each list item, defaultingt to `caption`
|
||||
: The name of the field to transclude for each list item, defaulting to `caption`
|
||||
;type
|
||||
: An HTML element to use for the overall list element, defaulting to `ul`
|
||||
;subtype
|
||||
|
@ -29,10 +29,10 @@ It uses the same method as the create new tiddler button, a number is appended t
|
||||
: This variable will be replaced by the ''separator'' parameter
|
||||
|
||||
;`$count$`
|
||||
: This variable will be createad automatically and is a counter starting with 0
|
||||
: This variable will be created automatically and is a counter starting with 0
|
||||
|
||||
;`$count:4$`
|
||||
: This variable will be createad automatically and starts at 0000
|
||||
: This variable will be created automatically and starts at 0000
|
||||
: `:4` represents the number of digits
|
||||
|
||||
!! Examples
|
||||
|
@ -36,6 +36,6 @@ Now consider the implementation of the info panel within the tiddler template. W
|
||||
|
||||
However, we can't track the state in a tiddler called, say, [[$:/InfoPanelState]] because every tiddler would share the same state; changing the value of the tiddler would affect all tiddlers displayed in the story.
|
||||
|
||||
The solution is to dynamically generate a unique title for each state tiddler that we need. We need to ensure that the same state tiddler title is generated each time a user interface element is rendered. To do that, we append together tokens representating each of the stack of transclusions that led to the current rendering location. Then that string of symbols is hashed to a simple numeric value.
|
||||
The solution is to dynamically generate a unique title for each state tiddler that we need. We need to ensure that the same state tiddler title is generated each time a user interface element is rendered. To do that, we append together tokens representing each of the stack of transclusions that led to the current rendering location. Then that string of symbols is hashed to a simple numeric value.
|
||||
|
||||
The process of generating a state tiddler title is encapsulated in the <<.mlink qualify>> macro.
|
||||
|
@ -6,9 +6,9 @@ type: text/vnd.tiddlywiki
|
||||
|
||||
The translation mechanism of TiddlyWiki manages and switches between language plugins that provide translations of the TiddlyWiki user interface. The developer site at https://tiddlywiki.com/dev/ explains how translators can create and submit translations for TiddlyWiki.
|
||||
|
||||
The title of the current language plugin is read from the tiddler [[$:/language]]. If the selected plugin changes then any displayed translateable text automatically changes.
|
||||
The title of the current language plugin is read from the tiddler [[$:/language]]. If the selected plugin changes then any displayed translatable text automatically changes.
|
||||
|
||||
Translation plugins are bundles of tiddlers that each contain an indepedent translatable string. The strings are transcluded as needed.
|
||||
Translation plugins are bundles of tiddlers that each contain an independent translatable string. The strings are transcluded as needed.
|
||||
|
||||
Translatable strings are generally in the namespace `$:/language/`, for example:
|
||||
|
||||
|
@ -12,7 +12,7 @@ type: text/vnd.tiddlywiki
|
||||
|
||||
The modal message is usually generated with the ButtonWidget. The modal message is handled by the TiddlyWiki core.
|
||||
|
||||
[[Fields within the tiddler|Modals]] being displayed in the modal can be used to customize its appearance.
|
||||
[[Fields within the tiddler|Modals]] being displayed in the modal can be used to customise its appearance.
|
||||
|
||||
!! paramObject
|
||||
|
||||
|
@ -52,7 +52,7 @@ Directory specifications in the `directories` array may take the following forms
|
||||
** ''filesRegExp'' - (optional) a [[regular expression|https://developer.mozilla.org/en/docs/Web/JavaScript/Guide/Regular_Expressions]] that matches the filenames of the files that should be processed within the directory
|
||||
** ''isTiddlerFile'' - (required) if `true`, the file will be treated as a [[tiddler file|TiddlerFiles]] and deserialised to extract the tiddlers. Otherwise, the raw content of the file is assigned to the `text` field without any parsing
|
||||
** ''isEditableFile'' - <<.from-version "5.1.23">> (optional) if `true`, changes to the tiddler be saved back to the original file. The tiddler will be saved back to the original filepath as long as it does not generate a result from the $:/config/FileSystemPath filters, which will override the final filepath generated if a result is returned from a filter.
|
||||
** ''searchSubdirectories'' - <<.from-version "5.1.23">> (optional) if `true`, all subdirectories of the //path// are searched recursively for files that match the (optional) //filesRegExp//. If no //filesRegExp// is provided, all files in all subdirectoies of the //path// are loaded. Tiddler titles generated via a //source// attribute (see above) will only include the filename, not any of the subdirectories of the path. If this results in multiple files with loaded with the same tiddler title, then only the last file loaded under that tiddler title will be in memory. In order to prevent this, you must have multiple directory objects listed and customize the title field with a //prefix// or //suffix// alongside the //source// attribute.
|
||||
** ''searchSubdirectories'' - <<.from-version "5.1.23">> (optional) if `true`, all subdirectories of the //path// are searched recursively for files that match the (optional) //filesRegExp//. If no //filesRegExp// is provided, all files in all subdirectories of the //path// are loaded. Tiddler titles generated via a //source// attribute (see above) will only include the filename, not any of the subdirectories of the path. If this results in multiple files with loaded with the same tiddler title, then only the last file loaded under that tiddler title will be in memory. In order to prevent this, you must have multiple directory objects listed and customise the title field with a //prefix// or //suffix// alongside the //source// attribute.
|
||||
** ''fields'' - (required) an object containing values that override or customise the fields provided in the tiddler file (see above)
|
||||
|
||||
Fields can also be overridden for particular files by creating a file with the same name plus the suffix `.meta` -- see TiddlerFiles.
|
||||
@ -65,7 +65,7 @@ There are also several examples of `tiddlywiki.files` files in the main [[Tiddly
|
||||
|
||||
!! Importing a folder of PDFs
|
||||
|
||||
This example retrieves all the files with the extension `.pdf` from a folder specified by a relative path. This path starts with "../../../" indicating 3 directory levels above the folder holdng this confog fole. Each tiddler is set up for LazyLoading with the following fields:
|
||||
This example retrieves all the files with the extension `.pdf` from a folder specified by a relative path. This path starts with "../../../" indicating 3 directory levels above the folder holding this config file. Each tiddler is set up for LazyLoading with the following fields:
|
||||
|
||||
* ''title'' - set to the URI decoded base filename of the PDF file. [[URI decoding|https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/decodeURIComponent]] allows characters like "/" to be included in titles by URI encoding them as "%2F"
|
||||
* ''created'' - set to the creation date/time of the PDF file
|
||||
|
@ -1,17 +1,13 @@
|
||||
created: 20221123223127425
|
||||
modified: 20221123223127425
|
||||
tags: Pragmas
|
||||
modified: 20230117112244779
|
||||
tags: Pragma
|
||||
title: Pragma: \parsermode
|
||||
type: text/vnd.tiddlywiki
|
||||
|
||||
The ''\parsermode'' [[pragma|Pragmas]] adjusts whether the remaining text is parsed in block mode or inline mode. See [[WikiText Parser Modes]] for details of parser modes.
|
||||
<<.from-version "5.2.4">>
|
||||
|
||||
```
|
||||
\parsermode block|inline
|
||||
```
|
||||
The ''\parsermode'' [[pragma|Pragma]] adjusts whether the remaining text is parsed in block mode or inline mode. See [[WikiText Parser Modes]] for details of parser modes.
|
||||
|
||||
For example:
|
||||
As with all pragmas, setting the parser mode this way can only be done at the start of text, not within the main body of the text.
|
||||
|
||||
```
|
||||
\parsermode inline
|
||||
```
|
||||
;`\parsermode block` or `\parsermode inline`
|
||||
|
@ -16,6 +16,6 @@ The following tiddlers are tagged with <<tag>>
|
||||
<$list filter='[all[tiddlers+shadows]tag<tag>sort[]]'>
|
||||
<tr>
|
||||
<td><$link/></td>
|
||||
<td>{{!!caption}}</td>
|
||||
<td><$transclude field="caption"><$transclude field="description"><$view field="title"/></$transclude></$transclude></td>
|
||||
</tr>
|
||||
</$list></table></$list></$let></$list>
|
||||
|
@ -1,18 +1,18 @@
|
||||
created: 20141002133113496
|
||||
modified: 20150221215644000
|
||||
modified: 20221221175615776
|
||||
tags: Concepts Reference
|
||||
title: Variables
|
||||
type: text/vnd.tiddlywiki
|
||||
|
||||
A <<.def variable>> is a snippet of text that can be accessed by name within a particular branch of the [[widget tree|Widgets]]. The snippet is known as the variable's <<.def value>>.
|
||||
|
||||
A new variable is defined using a <<.wlink SetWidget>> widget, and is then available to any of the children of that widget, including transcluded content. A <<.wid set>> widget can reuse an existing name, thus binding a different snippet to that name for the duration of the widget's children.
|
||||
A new variable is defined using a <<.wlink SetWidget>> or <<.wlink LetWidget>> widget, and is then available to any of the children of that widget, including transcluded content. A <<.wid set>> widget can reuse an existing name, thus binding a different snippet to that name for the duration of the widget's children.
|
||||
|
||||
The <<.wlink ListWidget>> widget also sets a particular variable (<<.var currentTiddler>> by default) to each listed title in turn.
|
||||
The <<.wlink ListWidget>> widget by default sets a particular variable <<.var currentTiddler>> to each listed title in turn.
|
||||
|
||||
For an overview of how to use variables, see [[Variables in WikiText]].
|
||||
|
||||
Despite the term <<.word variable>>, each snippet is a constant string. The apparent variability is actually the result of the presence of multiple variables with the same name in different parts of the widget tree.
|
||||
Despite the term <<.word variable>>, ''each snippet is a constant string''. The apparent variability is actually the result of the presence of multiple variables with the same name in different parts of the widget tree.
|
||||
|
||||
[[Macros]] are a special form of variable whose value can contain placeholders that get filled in with parameters whenever the macro is used.
|
||||
|
||||
|
@ -26,7 +26,7 @@ tiddlywiki YOUR_WIKI_FOLDER --listen 'root-tiddler=$:/core/save/all-external-js'
|
||||
|
||||
<<.tip """On Windows, Command Prompt (CMD) users need to replace single quotes `'` with double quotation marks `"`.""">>
|
||||
|
||||
!! Initializing a new wiki
|
||||
!! Initialising a new wiki
|
||||
|
||||
The provided edition `server-external-js` contains all the configuration necessary to use the external ~JavaScript template. Here is an example:
|
||||
|
||||
@ -37,10 +37,10 @@ tiddlywiki ./myNewWiki --build listen
|
||||
|
||||
The above commands perform the following:
|
||||
|
||||
* Create a new wiki with external JavaScript customization included.
|
||||
* Create a new wiki with external JavaScript customisation included.
|
||||
* Start the server with external ~JavaScript enabled. The server listens on port 8080. Visit http://localhost:8080 in your browser.
|
||||
|
||||
To customize your `--build listen` command, see [[tiddlywiki.info Files]] and [[ListenCommand]].
|
||||
To customise your `--build listen` command, see [[tiddlywiki.info Files]] and [[ListenCommand]].
|
||||
|
||||
! Using the external ~JavaScript template with the single file configuration
|
||||
|
||||
@ -52,7 +52,7 @@ You can use the "external-js" template with your single file wiki, but this requ
|
||||
|
||||
If you start your ~TiddlyWiki server in the "external-js" configuration, snapshots you save from the wiki will also have the external-js configuration.
|
||||
|
||||
You can click on the "cloud" button and choose <<.icon $:/core/images/download-button>> ''Save snapshot for offline use''. The html wiki you saved will have a reduced file size compared to a regular snapshot because the ~TiddlyWiki core code has been externalized. However, to be able to use this wiki, you ''must'' also have a copy of ~TiddlyWiki's core ~JavaScript in the same directory; see below for instructions for obtaining it
|
||||
You can click on the "cloud" button and choose <<.icon $:/core/images/download-button>> ''Save snapshot for offline use''. The html wiki you saved will have a reduced file size compared to a regular snapshot because the ~TiddlyWiki core code has been externalised. However, to be able to use this wiki, you ''must'' also have a copy of ~TiddlyWiki's core ~JavaScript in the same directory; see below for instructions for obtaining it
|
||||
|
||||
The "server-external-js" edition lets you save the snapshot from the command line:
|
||||
|
||||
|
@ -4,5 +4,5 @@ tags: [[WebServer Authentication]]
|
||||
title: WebServer Anonymous Access
|
||||
type: text/vnd.tiddlywiki
|
||||
|
||||
Anonymous access is only permitted if the special ''(anon)'' token is present in the [[readers|WebServer Parameter: readers]] (for reading) and optionally [[writers|WebServer Parameter: writers]] (for writing) authorization parameters.
|
||||
Anonymous access is only permitted if the special ''(anon)'' token is present in the [[readers|WebServer Parameter: readers]] (for reading) and optionally [[writers|WebServer Parameter: writers]] (for writing) authorisation parameters.
|
||||
|
||||
|
@ -8,7 +8,7 @@ type: text/vnd.tiddlywiki
|
||||
The [[web server configuration parameter|WebServer Parameters]] ''username'', in conjunction with its companion [[password|WebServer Parameter: password]]:
|
||||
|
||||
* Enables [[Basic Authentication|WebServer Basic Authentication]] with the specified username/password combination being added to any credentials specified with the [[credentials|WebServer Parameter: credentials]] parameter
|
||||
* The specified username is used as a default value for the [[readers|WebServer Parameter: readers]] and [[writers|WebServer Parameter: writers]] authorization parameters if they are not specified
|
||||
* The specified username is used as a default value for the [[readers|WebServer Parameter: readers]] and [[writers|WebServer Parameter: writers]] authorisation parameters if they are not specified
|
||||
|
||||
!! Examples
|
||||
|
||||
|
@ -7,7 +7,7 @@ type: text/vnd.tiddlywiki
|
||||
|
||||
! Introduction
|
||||
|
||||
The edit text widget provides a user interface in the browser for editing text tiddler fields. The editing element is dynamically bound to the underlying tiddler value: changes to the tiddler are instantly reflected, and any edits are instantly propogated.
|
||||
The edit text widget provides a user interface in the browser for editing text tiddler fields. The editing element is dynamically bound to the underlying tiddler value: changes to the tiddler are instantly reflected, and any edits are instantly propagated.
|
||||
|
||||
By default, applying the EditTextWidget to the `text` field of a tiddler will generates an HTML `<textarea>` element, i.e. a multi-line editor. Applying the EditTextWidget to any other field generates an HTML `<input type="text">` element, a single-line editor. This behaviour can be overridden with the `tag` and `type` attributes.
|
||||
|
||||
|
@ -16,7 +16,7 @@ In order for the events to be trapped:
|
||||
|
||||
* The event must be of one of the events specified in the event catcher widget's `events` attribute
|
||||
* The event must target a DOM node with an ancestor that matches the widget's `selector` attribute
|
||||
* <<.from-version "5.2.2">> Optionally, the DOM node targetted by the event must also match the widgets `matchSelector` attribute
|
||||
* <<.from-version "5.2.2">> Optionally, the DOM node targeted by the event must also match the widgets `matchSelector` attribute
|
||||
* The event must support event bubbling
|
||||
|
||||
Use of the event catcher widget is beneficial when using large numbers of other trigger widgets such as the ButtonWidget is causing performance problems. The workflow it enables is akin to what is referred to as "event delegation" in JavaScript parlance.
|
||||
@ -27,7 +27,7 @@ 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 |
|
||||
|matchSelector |<<.from-version "5.2.2">> An optional CSS selector. Only events targetting DOM nodes matching this selector will be trapped |
|
||||
|matchSelector |<<.from-version "5.2.2">> An optional CSS selector. Only events targeting DOM nodes matching 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 |
|
||||
|class |Optional. A CSS class name (or names) to be assigned to the widget HTML element |
|
||||
|
@ -1,24 +1,24 @@
|
||||
caption: genesis
|
||||
created: 20221101100729587
|
||||
modified: 20221230213912929
|
||||
modified: 20230115101800345
|
||||
tags: Widgets
|
||||
title: GenesisWidget
|
||||
type: text/vnd.tiddlywiki
|
||||
|
||||
! Introduction
|
||||
|
||||
<<.from-version "5.2.4">> The <<.wlink GenesisWidget>> widget allows the dynamic construction of another widget, where the name and attributes of the new widget can be dynamically determined, without needing to be known in advance.
|
||||
<<.from-version "5.2.4">> The <<.wid genesis>> widget allows the dynamic construction of another widget, where the name and attributes of the new widget can be dynamically determined, without needing to be known in advance.
|
||||
|
||||
! Content and Attributes
|
||||
|
||||
The content of the <<.wlink GenesisWidget>> widget is used as the content of the dynamically created widget.
|
||||
The content of the <<.wid genesis>> widget is used as the content of the dynamically created widget.
|
||||
|
||||
|!Attribute |!Description |
|
||||
|$type |The type of widget or element to create (an initial `$` indicates a widget, otherwise an HTML element will be created) |
|
||||
|$names |An optional filter evaluating to the names of a list of attributes to be applied to the widget |
|
||||
|$values |An optional filter evaluating to the values corresponding to the list of names specified in `$names` |
|
||||
|$values |An optional filter evaluating to the values corresponding to the list of names specified in <<.attr $names>> |
|
||||
|//{other attributes starting with $}// |Other attributes starting with a single dollar sign are reserved for future use |
|
||||
|//{attributes starting with $$}// |Attributes starting with two dollar signs are appplied as attributes to the output widget, but with the attribute name changed to use a single dollar sign |
|
||||
|//{attributes starting with $$}// |Attributes starting with two dollar signs are applied as attributes to the output widget, but with the attribute name changed to use a single dollar sign |
|
||||
|//{attributes not starting with $}// |Any other attributes that do not start with a dollar are applied as attributes to the output widget |
|
||||
|
||||
<<.from-version "5.2.6">> If the `$type` attribute is missing or blank, the <<.wlink GenesisWidget>> widget does not render an intrinsic element, instead just rendering its children.
|
||||
@ -27,10 +27,10 @@ Note that attributes explicitly specified take precedence over attributes with t
|
||||
|
||||
! Examples
|
||||
|
||||
<$macrocall $name='wikitext-example-without-html'
|
||||
src='<$genesis $type="div" class="tc-thing" label="Squeak">Mouse</$genesis>'/>
|
||||
<$macrocall $name="wikitext-example"
|
||||
src="""<$genesis $type="div" class="tc-thing" label="Squeak">Mouse</$genesis>"""/>
|
||||
|
||||
<$macrocall $name='wikitext-example-without-html'
|
||||
<$macrocall $name="wikitext-example"
|
||||
src="""\define my-banner(mode:"inline",caption)
|
||||
<$genesis $type={{{ [<__mode__>match[inline]then[span]else[div]] }}} class="tc-mybanner">
|
||||
<<__caption__>>
|
||||
@ -41,3 +41,11 @@ src="""\define my-banner(mode:"inline",caption)
|
||||
|
||||
<<my-banner mode:"block" caption:"I'm in a DIV">>
|
||||
"""/>
|
||||
|
||||
! Important
|
||||
|
||||
<$macrocall $name=".warning" _="""
|
||||
In the following example the widget attribute named `one` is absent from the HTML output, since HTML attributes with the prefix `on` are removed for security reasons. See [[HTML in WikiText]] "Security" for more details.
|
||||
|
||||
<<wikitext-example '<$genesis $type="my-element" $names="one two" $values="1 2">Test Genesis Widget</$genesis>'>>
|
||||
"""/>
|
@ -17,7 +17,7 @@ The navigator widget displays any contained content, and responds to Messages di
|
||||
|story |Name of the tiddler containing the story list to be manipulated |
|
||||
|history |Name of the tiddler containing the history list to be manipulated |
|
||||
|openLinkFromInsideRiver |Determines the location for opening new tiddlers from links within the story river: at the ''top'' or ''bottom'' of the story river, or ''above'' or ''below'' the current tiddler |
|
||||
|openLinkFromOutsideRiver|Determines the location for opening new tiddlers from linkes outside the story river: at the ''top'' or ''bottom'' of the story river|
|
||||
|openLinkFromOutsideRiver|Determines the location for opening new tiddlers from links outside the story river: at the ''top'' or ''bottom'' of the story river|
|
||||
|relinkOnRename|<<.from-version "5.1.14">> Determines if tags in other tiddlers are renamed if the tiddler title changes. ''yes'' or ''no''. default: ''no''|
|
||||
|
||||
! Widget Messages
|
||||
|
@ -48,5 +48,5 @@ In contrast, here is the same example using the <<.wid set>> widget:
|
||||
It should be noted that this widget differs from the <<.wid set>> widget in the following ways:
|
||||
|
||||
* A fallback (also known as "emptyValue") cannot be specified
|
||||
* Filters cannot be used to produce a conditional variable assignement
|
||||
* Filters cannot be used to produce a conditional variable assignment
|
||||
* Variable names must be literal strings
|
||||
|
@ -1,6 +1,6 @@
|
||||
caption: HTML
|
||||
created: 20131205160816081
|
||||
modified: 20220123174919252
|
||||
modified: 20230115100934146
|
||||
tags: WikiText
|
||||
title: HTML in WikiText
|
||||
type: text/vnd.tiddlywiki
|
||||
@ -31,7 +31,14 @@ some text <!-- inline comment -->
|
||||
|
||||
! Important
|
||||
|
||||
<<.tip """[[Widgets share the same syntax as HTML tags|Widgets in WikiText]], and so the following information applies to them, too.""">>
|
||||
!! Security
|
||||
|
||||
<<.warning """Every HTML attribute prefixed with `on` is removed from rendered HTML content for security reasons. eg: `onclick="some evil code"` would be executed, if no sanitation is active. In ~TiddlyWiki It's important to remove every attribute prefixed with `on` so future extensions to the HTML spec will be secure by default. This can lead to some inconvenience since custom attributes like eg: `one` are removed too. """>>
|
||||
|
||||
!! Widgets
|
||||
|
||||
<<.tip """[[Widgets share the same syntax as HTML tags|Widgets in WikiText]]<br>and so the following information applies to them, too.""">>
|
||||
|
||||
|
||||
! Block mode versus Inline mode
|
||||
|
||||
|
@ -98,5 +98,17 @@ Note that the textual substitution of macro parameters that occurs when the oute
|
||||
|
||||
Parameters of nested macros can also be accessed via the `<<__variablename__>>` syntax. As ordinary variables, these parameters are available within nested child macros (and grandchildren etc).
|
||||
|
||||
For the one-liner macro definition, the `\end` remains unnecessary for the inner macro. For example
|
||||
|
||||
<<wikitext-example-without-html src:"""\define special-button(caption:"Click me")
|
||||
\define actions() <$action-sendmessage $message="tm-notify" $param="HelloThere"/>
|
||||
<$button actions=<<actions>>>
|
||||
$caption$
|
||||
</$button>
|
||||
\end special-button
|
||||
|
||||
<<special-button>>
|
||||
""">>
|
||||
|
||||
A more formal [[presentation|Macro Definition Syntax]] of this syntax is also available.
|
||||
|
||||
|
@ -2,17 +2,19 @@ title: $:/language/Docs/Fields/
|
||||
|
||||
_canonical_uri: L'URI completo di un frammento immagine esterno
|
||||
_is_skinny: Se presente, indica che il campo di testo del frammento deve essere caricato dal server
|
||||
author: Il nome dell'autore di un plugin
|
||||
bag: Il nome del contenitore da cui proviene un frammento
|
||||
caption: Il testo che è visualizzato in un tab o in un pulsante
|
||||
caption: Il testo che è visualizzato in un tab o in un pulsante
|
||||
code-body: Il modello di visualizzazione visualizzerà il frammento come codice se impostato su ''sì''
|
||||
color: Il codice CSS del colore associato ad un frammento
|
||||
component: Il nome del componente responsabile per un [[frammento di avviso|AlertMechanism]]
|
||||
created: La data in cui il frammento è stato creato
|
||||
core-version: Per un plugin, indica con quale versione di TiddlyWiki è compatibile
|
||||
created: La data in cui il frammento è stato creato
|
||||
creator: Il nome della persona che ha creato il frammento
|
||||
current-tiddler: Utilizzato per memorizzare nella cache il frammento in alto nella [[cronologia|HistoryMechanism]]
|
||||
dependents: Per un plugin, elenca i titoli dei plugin dipendenti
|
||||
description: Il testo descrittivo per un plugin o per una modalità a dialogo
|
||||
draft.of: Per i frammenti bozza, contiene il titolo del frammento di cui questo è una bozza
|
||||
description: Il testo descrittivo per un plugin o per una modalità a dialogo
|
||||
draft.of: Per i frammenti bozza, contiene il titolo del frammento di cui questo è una bozza
|
||||
draft.title: Per i frammenti bozza, contiene la proposta di nuovo titolo per il frammento
|
||||
footer: Il testo del footer per una finestra modale
|
||||
hide-body: Il modello di visualizzazione nasconderà i corpi dei frammenti se impostato su ''sì''
|
||||
@ -20,11 +22,13 @@ icon: Il titolo del frammento che contiene l'icona associata con il frammento
|
||||
library: Indica che il frammento deve essere salvato come una libreria JavaScript se impostato su ''sì''
|
||||
list: Una lista ordinata di titoli di frammenti associati con un frammento
|
||||
list-after: Se impostato, il titolo del frammento dopo il quale questo frammento deve essere aggiunto all'elenco ordinato dei titoli dei frammenti, o alla fine dell'elenco se questo campo è presente ma vuoto
|
||||
list-before: Se impostato, il titolo del frammento prima del quale questo frammento deve essere aggiunto all'elenco ordinato dei titoli dei frammenti, o all'inizio della lista se questo campo è presente ma vuoto
|
||||
modified: La data e l'ora in cui un frammento è stato modificato l'ultima volta
|
||||
list-before: Se impostato, il titolo del frammento prima del quale questo frammento deve essere aggiunto all'elenco ordinato dei titoli dei frammenti, o all'inizio della lista se questo campo è presente ma vuoto
|
||||
modified: La data e l'ora in cui un frammento è stato modificato l'ultima volta
|
||||
modifier: Il titolo del frammento associato con la persona che ha modificato un frammento l'ultima volta
|
||||
module-type: Per i frammenti javascript, specifica di che tipo di modulo si tratta
|
||||
name: Il nome leggibile associato con un frammento plugin
|
||||
plugin-priority: Un valore numerico che indica la priorità di un frammento plugin
|
||||
parent-plugin: Per un plugin, specifica il plugin di cui è un sotto-plugin
|
||||
plugin-priority: Un valore numerico che indica la priorità di un frammento plugin
|
||||
plugin-type: Il tipo di plugin di un frammento plugin
|
||||
released: La data di rilascio di un TiddlyWiki
|
||||
revision: La revisione del frammento mantenuta sul server
|
||||
|
@ -104,5 +104,3 @@ TagManager/Tag/Heading: タグ
|
||||
Tiddler/DateFormat: YYYY年MM月DD日(ddd) 0hh:0mm
|
||||
UnsavedChangesWarning: 保存していない編集内容があります。
|
||||
Yes: はい
|
||||
$:/SiteSubtitle: 非線形パーソナルウェブノートブック
|
||||
$:/SiteTitle: 私の ~TiddlyWiki
|
||||
|
@ -8,8 +8,6 @@ Basics/AnimDuration/Prompt: Długość animacji
|
||||
Basics/AutoFocus/Prompt: Domyślne wybrane pole do edycji przy tworzeniu nowego tiddlera
|
||||
Basics/Caption: Podstawowe
|
||||
Basics/DefaultTiddlers/BottomHint: Tiddlery, które mają spację w nazie otocz [[podwójnymi nawiasami kwadratowymi]]. Możesz też ustawić, by zawsze widzieć {{ostatnio otwarte tiddlery||$:/snippets/retain-story-ordering-button}}
|
||||
Basics/DefaultTiddlers/BottomHint: Use [[double square brackets]] for titles with spaces. Or you can choose to <$button set="$:/DefaultTiddlers" setTo="[list[$:/StoryList]]">retain story ordering</$button>
|
||||
Basics/DefaultTiddlers/BottomHint: Use [[double square brackets]] for titles with spaces. Or you can choose to {{retain story ordering||$:/snippets/retain-story-ordering-button}}
|
||||
Basics/DefaultTiddlers/Prompt: Domyślnie otwarte tiddlery
|
||||
Basics/DefaultTiddlers/TopHint: Wybierz które tiddlery mają być widoczne przy uruchomieniu
|
||||
Basics/Language/Prompt: Cześć! Wybrany język to:
|
||||
|
@ -503,3 +503,17 @@ HuanCheng Bai, @bestony, 2022/09/17
|
||||
Carlo Colombo, @carlo-colombo, 2022/11/30
|
||||
|
||||
Wincent Balin, @wincentbalin, 2022/12/18
|
||||
|
||||
Jeffrey Zhang, @jeffrey4l, 2022/12/24
|
||||
|
||||
cs84285, @cs8425, 2022/12/30
|
||||
|
||||
Nick Bell, @newmedicine, 2023/01/01
|
||||
|
||||
Frank Kmiec, @fkmiec, 2023-01-01
|
||||
|
||||
Pippo Peppo, @pippep, 2023-01-03
|
||||
|
||||
Scott Sauye, @CrossEye, 2023-01-04
|
||||
|
||||
Marcus Winter, @yaisog, 2023-01-07
|
||||
|
@ -14,7 +14,6 @@ $tw = window.$tw || Object.create(null);
|
||||
$tw.hooks = $tw.hooks || { names: {}};
|
||||
$tw.boot = $tw.boot || {};
|
||||
$tw.boot.preloadDirty = $tw.boot.preloadDirty || [];
|
||||
|
||||
// Hook the point in the startup process when the tiddlers have been loaded but plugins not unpacked
|
||||
var hookName = "th-boot-tiddlers-loaded";
|
||||
if(Object.prototype.hasOwnProperty.call($tw.hooks.names,hookName)) {
|
||||
|
@ -19,19 +19,29 @@ exports.after = ["startup"];
|
||||
exports.synchronous = true;
|
||||
|
||||
var ENABLED_TITLE = "$:/config/BrowserStorage/Enabled",
|
||||
SAVE_FILTER_TITLE = "$:/config/BrowserStorage/SaveFilter",
|
||||
QUOTA_EXCEEDED_ALERT_TITLE = "$:/config/BrowserStorage/QuotaExceededAlert",
|
||||
DEFAULT_QUOTA_EXCEEDED_ALERT_PREFIX = "Quota exceeded attempting to store `",
|
||||
DEFAULT_QUOTA_EXCEEDED_ALERT_SUFFIX = "` in browser local storage";
|
||||
SAVE_FILTER_TITLE = "$:/config/BrowserStorage/SaveFilter";
|
||||
|
||||
var BrowserStorageUtil = require("$:/plugins/tiddlywiki/browser-storage/util.js").BrowserStorageUtil;
|
||||
|
||||
exports.startup = function() {
|
||||
var self = this;
|
||||
|
||||
// If not exists, add ENABLED tiddler with default value "yes"
|
||||
if(!$tw.wiki.getTiddler(ENABLED_TITLE)) {
|
||||
$tw.wiki.addTiddler({title: ENABLED_TITLE, text: "yes"});
|
||||
}
|
||||
// Compute our prefix for local storage keys
|
||||
var prefix = "tw5#" + window.location.pathname + "#";
|
||||
// Make a logger
|
||||
var logger = new $tw.utils.Logger("browser-storage",{
|
||||
colour: "cyan"
|
||||
});
|
||||
// Add browserStorage object to $tw
|
||||
$tw.browserStorage = new BrowserStorageUtil($tw.wiki,{
|
||||
enabledTitle: ENABLED_TITLE,
|
||||
prefix: prefix,
|
||||
logger: logger
|
||||
});
|
||||
// Function to compile the filter
|
||||
var filterFn,
|
||||
compileFilter = function() {
|
||||
@ -41,7 +51,7 @@ exports.startup = function() {
|
||||
// Listen for tm-clear-browser-storage messages
|
||||
$tw.rootWidget.addEventListener("tm-clear-browser-storage",function(event) {
|
||||
$tw.wiki.addTiddler({title: ENABLED_TITLE, text: "no"});
|
||||
clearLocalStorage();
|
||||
$tw.browserStorage.clearLocalStorage();
|
||||
});
|
||||
// Track tiddler changes
|
||||
$tw.wiki.addEventListener("change",function(changes) {
|
||||
@ -67,65 +77,9 @@ exports.startup = function() {
|
||||
return;
|
||||
}
|
||||
// Save the tiddler
|
||||
saveTiddlerToLocalStorage(title,{
|
||||
logger: logger,
|
||||
prefix: prefix
|
||||
});
|
||||
$tw.browserStorage.saveTiddlerToLocalStorage(title);
|
||||
});
|
||||
});
|
||||
};
|
||||
|
||||
function saveTiddlerToLocalStorage(title,options) {
|
||||
options = options || {};
|
||||
// Get the tiddler
|
||||
var tiddler = $tw.wiki.getTiddler(title);
|
||||
if(tiddler) {
|
||||
console.log("browser-storage: Saving",title);
|
||||
// Get the JSON of the tiddler
|
||||
var json = JSON.stringify(tiddler.getFieldStrings());
|
||||
// Try to save it to local storage
|
||||
try {
|
||||
window.localStorage.setItem(options.prefix + title,json);
|
||||
} catch(e) {
|
||||
if(e.name === "QuotaExceededError") {
|
||||
// Complain if we failed
|
||||
var msg = $tw.wiki.getTiddlerText(QUOTA_EXCEEDED_ALERT_TITLE,DEFAULT_QUOTA_EXCEEDED_ALERT_PREFIX + title + DEFAULT_QUOTA_EXCEEDED_ALERT_SUFFIX);
|
||||
if(options.logger) {
|
||||
options.logger.alert(msg);
|
||||
}
|
||||
// No point in keeping old values around for this tiddler
|
||||
window.localStorage.removeItem(options.prefix + title);
|
||||
} else {
|
||||
console.log("Browser-storage error:",e);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
// In local storage, use the special value of empty string to mark the tiddler as deleted
|
||||
// On future page loads, if the tiddler is already gone from startup then the blank entry
|
||||
// will be removed from localstorage. Otherwise, the tiddler will be deleted.
|
||||
console.log("browser-storage: Blanking",title);
|
||||
try {
|
||||
window.localStorage.setItem(options.prefix + title, "");
|
||||
} catch(e) {
|
||||
console.log("Browser-storage error:",e);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function clearLocalStorage() {
|
||||
var url = window.location.pathname,
|
||||
log = [];
|
||||
// Step through each browser storage item
|
||||
if(window.localStorage) {
|
||||
for(var index=window.localStorage.length - 1; index>=0; index--) {
|
||||
var key = window.localStorage.key(index),
|
||||
parts = key.split("#");
|
||||
// Delete it if it is ours
|
||||
if(parts[0] === "tw5" && parts[1] === url) {
|
||||
window.localStorage.removeItem(key);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
})();
|
||||
|
106
plugins/tiddlywiki/browser-storage/util.js
Normal file
106
plugins/tiddlywiki/browser-storage/util.js
Normal file
@ -0,0 +1,106 @@
|
||||
/*\
|
||||
title: $:/plugins/tiddlywiki/browser-storage/util.js
|
||||
type: application/javascript
|
||||
module-type: library
|
||||
|
||||
Utility methods for browser-storage plugin
|
||||
|
||||
\*/
|
||||
|
||||
(function(){
|
||||
|
||||
/*jslint node: true, browser: true */
|
||||
/*global $tw: false */
|
||||
"use strict";
|
||||
|
||||
function BrowserStorageUtil(wiki,options) {
|
||||
this.options = options || {};
|
||||
this.wiki = wiki;
|
||||
this.cachedTiddlers = [];
|
||||
this.QUOTA_EXCEEDED_ALERT_TITLE = "$:/config/BrowserStorage/QuotaExceededAlert";
|
||||
this.DEFAULT_QUOTA_EXCEEDED_ALERT_PREFIX = "Quota exceeded attempting to store `";
|
||||
this.DEFAULT_QUOTA_EXCEEDED_ALERT_SUFFIX = "` in browser local storage";
|
||||
}
|
||||
|
||||
BrowserStorageUtil.prototype.isEnabled = function() {
|
||||
return $tw.wiki.getTiddlerText(this.options.enabledTitle) === "yes";
|
||||
};
|
||||
|
||||
BrowserStorageUtil.prototype.cachePreloadTiddlers = function() {
|
||||
var self = this;
|
||||
$tw.utils.each($tw.boot.preloadDirty, function(item){
|
||||
var tiddler = $tw.wiki.getTiddler(item);
|
||||
self.cachedTiddlers.push(tiddler);
|
||||
});
|
||||
};
|
||||
|
||||
BrowserStorageUtil.prototype.addCachedTiddlers = function() {
|
||||
var self = this;
|
||||
if(this.cachedTiddlers.length > 0) {
|
||||
$tw.utils.each(this.cachedTiddlers, function(item){
|
||||
$tw.wiki.addTiddler(item);
|
||||
});
|
||||
this.cachedTiddlers.length = 0;
|
||||
}
|
||||
};
|
||||
|
||||
BrowserStorageUtil.prototype.removeTiddlerFromLocalStorage = function(title) {
|
||||
console.log("browser-storage: Removing", title);
|
||||
window.localStorage.removeItem(this.options.prefix + title);
|
||||
};
|
||||
|
||||
BrowserStorageUtil.prototype.saveTiddlerToLocalStorage = function(title) {
|
||||
// Get the tiddler
|
||||
var tiddler = $tw.wiki.getTiddler(title);
|
||||
if(tiddler) {
|
||||
console.log("browser-storage: Saving",title);
|
||||
// Get the JSON of the tiddler
|
||||
var json = JSON.stringify(tiddler.getFieldStrings());
|
||||
// Try to save it to local storage
|
||||
try {
|
||||
window.localStorage.setItem(this.options.prefix + title,json);
|
||||
} catch(e) {
|
||||
if(e.name === "QuotaExceededError") {
|
||||
// Complain if we failed
|
||||
var msg = $tw.wiki.getTiddlerText(this.QUOTA_EXCEEDED_ALERT_TITLE,this.DEFAULT_QUOTA_EXCEEDED_ALERT_PREFIX + title + this.DEFAULT_QUOTA_EXCEEDED_ALERT_SUFFIX);
|
||||
if(this.options.logger) {
|
||||
this.options.logger.alert(msg);
|
||||
}
|
||||
// No point in keeping old values around for this tiddler
|
||||
window.localStorage.removeItem(this.options.prefix + title);
|
||||
} else {
|
||||
console.log("Browser-storage error:",e);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
// In local storage, use the special value of empty string to mark the tiddler as deleted
|
||||
// On future page loads, if the tiddler is already gone from startup then the blank entry
|
||||
// will be removed from localstorage. Otherwise, the tiddler will be deleted.
|
||||
console.log("browser-storage: Blanking",title);
|
||||
try {
|
||||
window.localStorage.setItem(this.options.prefix + title, "");
|
||||
} catch(e) {
|
||||
console.log("Browser-storage error:",e);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
BrowserStorageUtil.prototype.clearLocalStorage = function() {
|
||||
var url = window.location.pathname,
|
||||
log = [];
|
||||
// Step through each browser storage item
|
||||
if(window.localStorage) {
|
||||
for(var index=window.localStorage.length - 1; index>=0; index--) {
|
||||
var key = window.localStorage.key(index),
|
||||
parts = key.split("#");
|
||||
// Delete it if it is ours
|
||||
if(parts[0] === "tw5" && parts[1] === url) {
|
||||
window.localStorage.removeItem(key);
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
exports.BrowserStorageUtil = BrowserStorageUtil;
|
||||
|
||||
})();
|
@ -8,4 +8,5 @@ text/html: codemirror
|
||||
text/plain: codemirror
|
||||
text/vnd.tiddlywiki: codemirror
|
||||
text/x-markdown: codemirror
|
||||
text/markdown: codemirror
|
||||
text/x-tiddlywiki: codemirror
|
||||
|
@ -1 +1 @@
|
||||
!function(e){"object"==typeof exports&&"object"==typeof module?e(require("../lib/codemirror")):"function"==typeof define&&define.amd?define(["../lib/codemirror"],e):e(CodeMirror)}(function(e){"use strict";e.modeInfo=[{name:"CMake",mime:"text/x-cmake",mode:"cmake",ext:["cmake","cmake.in"],file:/^CMakeLists.txt$/},{name:"Cython",mime:"text/x-cython",mode:"python",ext:["pyx","pxd","pxi"]},{name:"CSS",mime:"text/css",mode:"css",ext:["css"]},{name:"diff",mime:"text/x-diff",mode:"diff",ext:["diff","patch"]},{name:"Embedded Javascript",mime:"application/x-ejs",mode:"htmlembedded",ext:["ejs"]},{name:"Embedded Ruby",mime:"application/x-erb",mode:"htmlembedded",ext:["erb"]},{name:"Erlang",mime:"text/x-erlang",mode:"erlang",ext:["erl"]},{name:"GitHub Flavored Markdown",mime:"text/x-gfm",mode:"gfm",file:/^(readme|contributing|history).md$/i},{name:"Go",mime:"text/x-go",mode:"go",ext:["go"]},{name:"ASP.NET",mime:"application/x-aspx",mode:"htmlembedded",ext:["aspx"],alias:["asp","aspx"]},{name:"HTML",mime:"text/html",mode:"htmlmixed",ext:["html","htm","handlebars","hbs"],alias:["xhtml"]},{name:"HTTP",mime:"message/http",mode:"http"},{name:"JavaScript",mimes:["text/javascript","text/ecmascript","application/javascript","application/x-javascript","application/ecmascript"],mode:"javascript",ext:["js"],alias:["ecmascript","js","node"]},{name:"JSON",mimes:["application/json","application/x-json"],mode:"javascript",ext:["json","map"],alias:["json5"]},{name:"JSON-LD",mime:"application/ld+json",mode:"javascript",ext:["jsonld"],alias:["jsonld"]},{name:"Lua",mime:"text/x-lua",mode:"lua",ext:["lua"]},{name:"Markdown",mime:"text/x-markdown",mode:"markdown",ext:["markdown","md","mkd"]},{name:"MySQL",mime:"text/x-mysql",mode:"sql"},{name:"Plain Text",mime:"text/plain",mode:"null",ext:["txt","text","conf","def","list","log"]},{name:"Python",mime:"text/x-python",mode:"python",ext:["BUILD","bzl","py","pyw"],file:/^(BUCK|BUILD)$/},{name:"SCSS",mime:"text/x-scss",mode:"css",ext:["scss"]},{name:"LaTeX",mime:"text/x-latex",mode:"stex",ext:["text","ltx","tex"],alias:["tex"]},{name:"TiddlyWiki ",mime:"text/x-tiddlywiki",mode:"tiddlywiki"}];for(var t=0;t<e.modeInfo.length;t++){var m=e.modeInfo[t];m.mimes&&(m.mime=m.mimes[0])}e.findModeByMIME=function(t){t=t.toLowerCase();for(var m=0;m<e.modeInfo.length;m++){var i=e.modeInfo[m];if(i.mime==t)return i;if(i.mimes)for(var a=0;a<i.mimes.length;a++)if(i.mimes[a]==t)return i}return/\+xml$/.test(t)?e.findModeByMIME("application/xml"):/\+json$/.test(t)?e.findModeByMIME("application/json"):void 0},e.findModeByExtension=function(t){for(var m=0;m<e.modeInfo.length;m++){var i=e.modeInfo[m];if(i.ext)for(var a=0;a<i.ext.length;a++)if(i.ext[a]==t)return i}},e.findModeByFileName=function(t){for(var m=0;m<e.modeInfo.length;m++){var i=e.modeInfo[m];if(i.file&&i.file.test(t))return i}var a=t.lastIndexOf("."),o=a>-1&&t.substring(a+1,t.length);if(o)return e.findModeByExtension(o)},e.findModeByName=function(t){t=t.toLowerCase();for(var m=0;m<e.modeInfo.length;m++){var i=e.modeInfo[m];if(i.name.toLowerCase()==t)return i;if(i.alias)for(var a=0;a<i.alias.length;a++)if(i.alias[a].toLowerCase()==t)return i}}});
|
||||
!function(e){"object"==typeof exports&&"object"==typeof module?e(require("../lib/codemirror")):"function"==typeof define&&define.amd?define(["../lib/codemirror"],e):e(CodeMirror)}(function(e){"use strict";e.modeInfo=[{name:"CMake",mime:"text/x-cmake",mode:"cmake",ext:["cmake","cmake.in"],file:/^CMakeLists.txt$/},{name:"Cython",mime:"text/x-cython",mode:"python",ext:["pyx","pxd","pxi"]},{name:"CSS",mime:"text/css",mode:"css",ext:["css"]},{name:"diff",mime:"text/x-diff",mode:"diff",ext:["diff","patch"]},{name:"Embedded Javascript",mime:"application/x-ejs",mode:"htmlembedded",ext:["ejs"]},{name:"Embedded Ruby",mime:"application/x-erb",mode:"htmlembedded",ext:["erb"]},{name:"Erlang",mime:"text/x-erlang",mode:"erlang",ext:["erl"]},{name:"GitHub Flavored Markdown",mime:"text/x-gfm",mode:"gfm",file:/^(readme|contributing|history).md$/i},{name:"Go",mime:"text/x-go",mode:"go",ext:["go"]},{name:"ASP.NET",mime:"application/x-aspx",mode:"htmlembedded",ext:["aspx"],alias:["asp","aspx"]},{name:"HTML",mime:"text/html",mode:"htmlmixed",ext:["html","htm","handlebars","hbs"],alias:["xhtml"]},{name:"HTTP",mime:"message/http",mode:"http"},{name:"JavaScript",mimes:["text/javascript","text/ecmascript","application/javascript","application/x-javascript","application/ecmascript"],mode:"javascript",ext:["js"],alias:["ecmascript","js","node"]},{name:"JSON",mimes:["application/json","application/x-json"],mode:"javascript",ext:["json","map"],alias:["json5"]},{name:"JSON-LD",mime:"application/ld+json",mode:"javascript",ext:["jsonld"],alias:["jsonld"]},{name:"Lua",mime:"text/x-lua",mode:"lua",ext:["lua"]},{name:"Markdown",mimes:["text/x-markdown","text/markdown"],mode:"markdown",ext:["markdown","md","mkd"]},{name:"MySQL",mime:"text/x-mysql",mode:"sql"},{name:"Plain Text",mime:"text/plain",mode:"null",ext:["txt","text","conf","def","list","log"]},{name:"Python",mime:"text/x-python",mode:"python",ext:["BUILD","bzl","py","pyw"],file:/^(BUCK|BUILD)$/},{name:"SCSS",mime:"text/x-scss",mode:"css",ext:["scss"]},{name:"LaTeX",mime:"text/x-latex",mode:"stex",ext:["text","ltx","tex"],alias:["tex"]},{name:"TiddlyWiki ",mime:"text/x-tiddlywiki",mode:"tiddlywiki"}];for(var t=0;t<e.modeInfo.length;t++){var m=e.modeInfo[t];m.mimes&&(m.mime=m.mimes[0])}e.findModeByMIME=function(t){t=t.toLowerCase();for(var m=0;m<e.modeInfo.length;m++){var i=e.modeInfo[m];if(i.mime==t)return i;if(i.mimes)for(var a=0;a<i.mimes.length;a++)if(i.mimes[a]==t)return i}return/\+xml$/.test(t)?e.findModeByMIME("application/xml"):/\+json$/.test(t)?e.findModeByMIME("application/json"):void 0},e.findModeByExtension=function(t){for(var m=0;m<e.modeInfo.length;m++){var i=e.modeInfo[m];if(i.ext)for(var a=0;a<i.ext.length;a++)if(i.ext[a]==t)return i}},e.findModeByFileName=function(t){for(var m=0;m<e.modeInfo.length;m++){var i=e.modeInfo[m];if(i.file&&i.file.test(t))return i}var a=t.lastIndexOf("."),o=a>-1&&t.substring(a+1,t.length);if(o)return e.findModeByExtension(o)},e.findModeByName=function(t){t=t.toLowerCase();for(var m=0;m<e.modeInfo.length;m++){var i=e.modeInfo[m];if(i.name.toLowerCase()==t)return i;if(i.alias)for(var a=0;a<i.alias.length;a++)if(i.alias[a].toLowerCase()==t)return i}}});
|
||||
|
@ -6,3 +6,4 @@ text/css: css
|
||||
text/html: html
|
||||
image/svg+xml: xml
|
||||
text/x-markdown: markdown
|
||||
text/markdown: markdown
|
@ -6,3 +6,4 @@ text/css: css
|
||||
text/html: html
|
||||
image/svg+xml: xml
|
||||
text/x-markdown: markdown
|
||||
text/markdown: markdown
|
||||
|
15
plugins/tiddlywiki/markdown-legacy/EditorToolbar/bold.tid
Executable file
15
plugins/tiddlywiki/markdown-legacy/EditorToolbar/bold.tid
Executable file
@ -0,0 +1,15 @@
|
||||
title: $:/plugins/tiddlywiki/markdown-legacy/EditorToolbar/bold
|
||||
list-after: $:/core/ui/EditorToolbar/bold
|
||||
tags: $:/tags/EditorToolbar
|
||||
icon: $:/core/images/bold
|
||||
caption: {{$:/language/Buttons/Bold/Caption}} (Markdown)
|
||||
description: {{$:/language/Buttons/Bold/Hint}}
|
||||
condition: [<targetTiddler>type[text/x-markdown]] [<targetTiddler>type[text/markdown]]
|
||||
shortcuts: ((bold))
|
||||
|
||||
<$action-sendmessage
|
||||
$message="tm-edit-text-operation"
|
||||
$param="wrap-selection"
|
||||
prefix="**"
|
||||
suffix="**"
|
||||
/>
|
15
plugins/tiddlywiki/markdown-legacy/EditorToolbar/heading-1.tid
Executable file
15
plugins/tiddlywiki/markdown-legacy/EditorToolbar/heading-1.tid
Executable file
@ -0,0 +1,15 @@
|
||||
title: $:/plugins/tiddlywiki/markdown-legacy/EditorToolbar/heading-1
|
||||
list-after: $:/core/ui/EditorToolbar/heading-1
|
||||
tags: $:/tags/EditorToolbar
|
||||
icon: $:/core/images/heading-1
|
||||
caption: {{$:/language/Buttons/Heading1/Caption}} (Markdown)
|
||||
description: {{$:/language/Buttons/Heading1/Hint}}
|
||||
condition: [<targetTiddler>type[text/x-markdown]] [<targetTiddler>type[text/markdown]]
|
||||
shortcuts: ((heading-1))
|
||||
|
||||
<$action-sendmessage
|
||||
$message="tm-edit-text-operation"
|
||||
$param="prefix-lines"
|
||||
character="#"
|
||||
count="1"
|
||||
/>
|
15
plugins/tiddlywiki/markdown-legacy/EditorToolbar/heading-2.tid
Executable file
15
plugins/tiddlywiki/markdown-legacy/EditorToolbar/heading-2.tid
Executable file
@ -0,0 +1,15 @@
|
||||
title: $:/plugins/tiddlywiki/markdown-legacy/EditorToolbar/heading-2
|
||||
list-after: $:/core/ui/EditorToolbar/heading-2
|
||||
tags: $:/tags/EditorToolbar
|
||||
icon: $:/core/images/heading-2
|
||||
caption: {{$:/language/Buttons/Heading2/Caption}} (Markdown)
|
||||
description: {{$:/language/Buttons/Heading2/Hint}}
|
||||
condition: [<targetTiddler>type[text/x-markdown]] [<targetTiddler>type[text/markdown]]
|
||||
shortcuts: ((heading-2))
|
||||
|
||||
<$action-sendmessage
|
||||
$message="tm-edit-text-operation"
|
||||
$param="prefix-lines"
|
||||
character="#"
|
||||
count="2"
|
||||
/>
|
15
plugins/tiddlywiki/markdown-legacy/EditorToolbar/heading-3.tid
Executable file
15
plugins/tiddlywiki/markdown-legacy/EditorToolbar/heading-3.tid
Executable file
@ -0,0 +1,15 @@
|
||||
title: $:/plugins/tiddlywiki/markdown-legacy/EditorToolbar/heading-3
|
||||
list-after: $:/core/ui/EditorToolbar/heading-3
|
||||
tags: $:/tags/EditorToolbar
|
||||
icon: $:/core/images/heading-3
|
||||
caption: {{$:/language/Buttons/Heading3/Caption}} (Markdown)
|
||||
description: {{$:/language/Buttons/Heading3/Hint}}
|
||||
condition: [<targetTiddler>type[text/x-markdown]] [<targetTiddler>type[text/markdown]]
|
||||
shortcuts: ((heading-3))
|
||||
|
||||
<$action-sendmessage
|
||||
$message="tm-edit-text-operation"
|
||||
$param="prefix-lines"
|
||||
character="#"
|
||||
count="3"
|
||||
/>
|
15
plugins/tiddlywiki/markdown-legacy/EditorToolbar/heading-4.tid
Executable file
15
plugins/tiddlywiki/markdown-legacy/EditorToolbar/heading-4.tid
Executable file
@ -0,0 +1,15 @@
|
||||
title: $:/plugins/tiddlywiki/markdown-legacy/EditorToolbar/heading-4
|
||||
list-after: $:/core/ui/EditorToolbar/heading-4
|
||||
tags: $:/tags/EditorToolbar
|
||||
icon: $:/core/images/heading-4
|
||||
caption: {{$:/language/Buttons/Heading4/Caption}} (Markdown)
|
||||
description: {{$:/language/Buttons/Heading4/Hint}}
|
||||
condition: [<targetTiddler>type[text/x-markdown]] [<targetTiddler>type[text/markdown]]
|
||||
shortcuts: ((heading-4))
|
||||
|
||||
<$action-sendmessage
|
||||
$message="tm-edit-text-operation"
|
||||
$param="prefix-lines"
|
||||
character="#"
|
||||
count="4"
|
||||
/>
|
15
plugins/tiddlywiki/markdown-legacy/EditorToolbar/heading-5.tid
Executable file
15
plugins/tiddlywiki/markdown-legacy/EditorToolbar/heading-5.tid
Executable file
@ -0,0 +1,15 @@
|
||||
title: $:/plugins/tiddlywiki/markdown-legacy/EditorToolbar/heading-5
|
||||
list-after: $:/core/ui/EditorToolbar/heading-5
|
||||
tags: $:/tags/EditorToolbar
|
||||
icon: $:/core/images/heading-5
|
||||
caption: {{$:/language/Buttons/Heading5/Caption}} (Markdown)
|
||||
description: {{$:/language/Buttons/Heading5/Hint}}
|
||||
condition: [<targetTiddler>type[text/x-markdown]] [<targetTiddler>type[text/markdown]]
|
||||
shortcuts: ((heading-5))
|
||||
|
||||
<$action-sendmessage
|
||||
$message="tm-edit-text-operation"
|
||||
$param="prefix-lines"
|
||||
character="#"
|
||||
count="5"
|
||||
/>
|
15
plugins/tiddlywiki/markdown-legacy/EditorToolbar/heading-6.tid
Executable file
15
plugins/tiddlywiki/markdown-legacy/EditorToolbar/heading-6.tid
Executable file
@ -0,0 +1,15 @@
|
||||
title: $:/plugins/tiddlywiki/markdown-legacy/EditorToolbar/heading-6
|
||||
list-after: $:/core/ui/EditorToolbar/heading-6
|
||||
tags: $:/tags/EditorToolbar
|
||||
icon: $:/core/images/heading-6
|
||||
caption: {{$:/language/Buttons/Heading6/Caption}} (Markdown)
|
||||
description: {{$:/language/Buttons/Heading6/Hint}}
|
||||
condition: [<targetTiddler>type[text/x-markdown]] [<targetTiddler>type[text/markdown]]
|
||||
shortcuts: ((heading-6))
|
||||
|
||||
<$action-sendmessage
|
||||
$message="tm-edit-text-operation"
|
||||
$param="prefix-lines"
|
||||
character="#"
|
||||
count="6"
|
||||
/>
|
15
plugins/tiddlywiki/markdown-legacy/EditorToolbar/italic.tid
Executable file
15
plugins/tiddlywiki/markdown-legacy/EditorToolbar/italic.tid
Executable file
@ -0,0 +1,15 @@
|
||||
title: $:/plugins/tiddlywiki/markdown-legacy/EditorToolbar/italic
|
||||
list-after: $:/core/ui/EditorToolbar/italic
|
||||
tags: $:/tags/EditorToolbar
|
||||
icon: $:/core/images/italic
|
||||
caption: {{$:/language/Buttons/Italic/Caption}} (Markdown)
|
||||
description: {{$:/language/Buttons/Italic/Hint}}
|
||||
condition: [<targetTiddler>type[text/x-markdown]] [<targetTiddler>type[text/markdown]]
|
||||
shortcuts: ((italic))
|
||||
|
||||
<$action-sendmessage
|
||||
$message="tm-edit-text-operation"
|
||||
$param="wrap-selection"
|
||||
prefix="*"
|
||||
suffix="*"
|
||||
/>
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user