diff --git a/core/language/en-GB/EditTemplate.multids b/core/language/en-GB/EditTemplate.multids index fc436059e..c4bfa5e56 100644 --- a/core/language/en-GB/EditTemplate.multids +++ b/core/language/en-GB/EditTemplate.multids @@ -1,5 +1,6 @@ title: $:/language/EditTemplate/ +Caption: Editor Body/External/Hint: This tiddler shows content stored outside of the main TiddlyWiki file. You can edit the tags and fields but cannot directly edit the content itself Body/Placeholder: Type the text for this tiddler Body/Preview/Type/Output: output diff --git a/core/language/en-GB/SideBar.multids b/core/language/en-GB/SideBar.multids index b109f3a9b..c4fda9c81 100644 --- a/core/language/en-GB/SideBar.multids +++ b/core/language/en-GB/SideBar.multids @@ -1,5 +1,6 @@ title: $:/language/SideBar/ +Caption: Sidebar All/Caption: All Contents/Caption: Contents Drafts/Caption: Drafts diff --git a/core/modules/commands/render.js b/core/modules/commands/render.js index 09e366011..b396deef9 100644 --- a/core/modules/commands/render.js +++ b/core/modules/commands/render.js @@ -50,7 +50,7 @@ Render individual tiddlers and save the results to the specified files console.log("Rendering \"" + title + "\" to \"" + filepath + "\""); } var parser = wiki.parseTiddler(template || title), - widgetNode = wiki.makeWidget(parser,{variables: $tw.utils.extend({},variables,{currentTiddler: title})}), + widgetNode = wiki.makeWidget(parser,{variables: $tw.utils.extend({},variables,{currentTiddler: title,storyTiddler: title})}), container = $tw.fakeDocument.createElement("div"); widgetNode.render(container,null); var text = type === "text/html" ? container.innerHTML : container.textContent; diff --git a/core/modules/commands/rendertiddler.js b/core/modules/commands/rendertiddler.js index 1860beb7e..41812aea1 100755 --- a/core/modules/commands/rendertiddler.js +++ b/core/modules/commands/rendertiddler.js @@ -40,6 +40,7 @@ Command.prototype.execute = function() { $tw.utils.createFileDirectories(filename); if(template) { variables.currentTiddler = title; + variables.storyTiddler = title; title = template; } if(name && value) { diff --git a/core/modules/commands/rendertiddlers.js b/core/modules/commands/rendertiddlers.js index 01af09649..91030b0f3 100644 --- a/core/modules/commands/rendertiddlers.js +++ b/core/modules/commands/rendertiddlers.js @@ -46,7 +46,7 @@ Command.prototype.execute = function() { } $tw.utils.each(tiddlers,function(title) { var parser = wiki.parseTiddler(template), - widgetNode = wiki.makeWidget(parser,{variables: {currentTiddler: title}}), + widgetNode = wiki.makeWidget(parser,{variables: {currentTiddler: title, storyTiddler: title}}), container = $tw.fakeDocument.createElement("div"); widgetNode.render(container,null); var text = type === "text/html" ? container.innerHTML : container.textContent, diff --git a/core/modules/utils/dom/notifier.js b/core/modules/utils/dom/notifier.js index 3897b0e52..bf93d451c 100644 --- a/core/modules/utils/dom/notifier.js +++ b/core/modules/utils/dom/notifier.js @@ -36,8 +36,9 @@ Notifier.prototype.display = function(title,options) { if(!tiddler) { return; } - // Add classes + // Add classes and roles $tw.utils.addClass(notification,"tc-notification"); + notification.setAttribute("role","alert"); // Create the variables var variables = $tw.utils.extend({currentTiddler: title},options.variables); // Render the body of the notification diff --git a/core/modules/widgets/button.js b/core/modules/widgets/button.js index 107977ac0..a32820e8b 100644 --- a/core/modules/widgets/button.js +++ b/core/modules/widgets/button.js @@ -46,7 +46,8 @@ ButtonWidget.prototype.render = function(parent,nextSibling) { isPoppedUp = (this.popup || this.popupTitle) && this.isPoppedUp(); if(this.selectedClass) { if((this.set || this.setTitle) && this.setTo && this.isSelected()) { - $tw.utils.pushTop(classes,this.selectedClass.split(" ")); + $tw.utils.pushTop(classes, this.selectedClass.split(" ")); + domNode.setAttribute("aria-checked", "true"); } if(isPoppedUp) { $tw.utils.pushTop(classes,this.selectedClass.split(" ")); @@ -66,6 +67,9 @@ ButtonWidget.prototype.render = function(parent,nextSibling) { if(this["aria-label"]) { domNode.setAttribute("aria-label",this["aria-label"]); } + if (this.role) { + domNode.setAttribute("role", this.role); + } if(this.popup || this.popupTitle) { domNode.setAttribute("aria-expanded",isPoppedUp ? "true" : "false"); } @@ -206,6 +210,7 @@ ButtonWidget.prototype.execute = function() { this.popup = this.getAttribute("popup"); this.hover = this.getAttribute("hover"); this["aria-label"] = this.getAttribute("aria-label"); + this.role = this.getAttribute("role"); this.tooltip = this.getAttribute("tooltip"); this.style = this.getAttribute("style"); this["class"] = this.getAttribute("class",""); diff --git a/core/templates/server/static.sidebar.wikitext.tid b/core/templates/server/static.sidebar.wikitext.tid index 5ac53703e..b0cf553f6 100644 --- a/core/templates/server/static.sidebar.wikitext.tid +++ b/core/templates/server/static.sidebar.wikitext.tid @@ -1,7 +1,7 @@ title: $:/core/templates/server/static.sidebar.wikitext \whitespace trim -
Text tab 2
Text tab 2
Text tab 2
Text tab 2
Text tab 2
Text tab 2
npm install -g tiddlywiki@5.1.13
">>
diff --git a/editions/tw5.com/tiddlers/nodejs/Installing custom plugins on Node.js.tid b/editions/tw5.com/tiddlers/nodejs/Installing custom plugins on Node.js.tid
index 1f4a12177..462482e51 100644
--- a/editions/tw5.com/tiddlers/nodejs/Installing custom plugins on Node.js.tid
+++ b/editions/tw5.com/tiddlers/nodejs/Installing custom plugins on Node.js.tid
@@ -1,27 +1,19 @@
created: 20191022095653896
-modified: 20191102131824766
-tags: [[TiddlyWiki on Node.js]]
+modified: 20220617130125173
+tags: [[TiddlyWiki on Node.js]] PluginsCS
title: Installing custom plugins on Node.js
type: text/vnd.tiddlywiki
-There are several ways in which custom plugins that are not part of TiddlyWiki's plugin library can be installed when using TiddlyWiki under Node.js. (See [[Installing a plugin from the plugin library]] for instructions on installing plugins from the library).
+\rules except wikilink
-* Arrange the PluginFolders containing the plugins in a convenient shared location and then use [[environment variables|Environment Variables on Node.js]] to tell TiddlyWiki to search those folders. The plugins can be referenced in `tiddlywiki.info` by their name (e.g. `tiddlytools/magic`)
-* Place the PluginFolders containing the plugins in a `plugins` folder within the [[wiki folder|TiddlyWikiFolders]]. TiddlyWiki will attempt to include every subfolder as a plugin. Do not add the plugin names to `tiddlywiki.info`. Do not add the PluginFolders under a specific namespace:. -├── plugins -│ ├── relink -│ │ ├── js -│ │ ├── plugin.info -│ │ └── tiddlers -│ └── relink-markdown -│ ├── js -│ ├── plugin.info -│ └── readme.tid -├── tiddlers -└── tiddlywiki.info --* Depending on how TiddlyWiki itself has been installed, plugins can also be installed by copying the plugin folders into the `plugins` folder of the repository. This is only recommended if working with a forked copy of the repo. It is not recommended if TiddlyWiki has been installed with npm because npm is liable to overwrite the installation when performing an update +! Introduction -Note that including a plugin as an ordinary tiddler (e.g. by dragging and dropping a plugin into the browser) will result in the plugin only being active in the browser, and not available under Node.js. +There are several ways in which official plugins and custom plugins can be installed when using TiddlyWiki with a Node.js client-server configuration. +<$macrocall $name=".note" _="""For instructions on installing plugins from libraries to ''single-file'' wikis learn more at [[Plugins]]. +"""/> + +!! Plugin Load Order + +{{Plugin Ordering}} diff --git a/editions/tw5.com/tiddlers/nodejs/Installing official plugins on Node.js.tid b/editions/tw5.com/tiddlers/nodejs/Installing official plugins on Node.js.tid new file mode 100644 index 000000000..c985ea9a6 --- /dev/null +++ b/editions/tw5.com/tiddlers/nodejs/Installing official plugins on Node.js.tid @@ -0,0 +1,40 @@ +created: 20220611123344385 +modified: 20220617132351460 +tags: [[TiddlyWiki on Node.js]] PluginsCS +title: Installing official plugins on Node.js +type: text/vnd.tiddlywiki + +Follow these instructions when using TiddlyWiki with a client-server Node.js configuration: + +# Identify the plugins you want to install using the ''Plugins'' tab of <
<$view field="text"/>\ No newline at end of file diff --git a/editions/tw5.com/tiddlers/system/wikitext-macros.tid b/editions/tw5.com/tiddlers/system/wikitext-macros.tid index cb5f81bf1..2c10a678b 100644 --- a/editions/tw5.com/tiddlers/system/wikitext-macros.tid +++ b/editions/tw5.com/tiddlers/system/wikitext-macros.tid @@ -1,9 +1,46 @@ +code-body: yes created: 20150117184156000 -modified: 20220227210152153 +modified: 20220617122915793 tags: $:/tags/Macro title: $:/editions/tw5.com/wikitext-macros type: text/vnd.tiddlywiki +\define activatePluginTab() +<$action-setfield $tiddler="$:/state/tab-1749438307" text="$:/core/ui/ControlPanel/Plugins"/> +<$action-navigate $to="$:/ControlPanel"/> +\end + +\define activateTiddlerWindow() +<$action-sendmessage $message="tm-open-window" + $param=<
<$view field="text"/>\ No newline at end of file diff --git a/editions/tw5.com/tiddlers/widgets/ScrollableWidget.tid b/editions/tw5.com/tiddlers/widgets/ScrollableWidget.tid index da5b536c9..a0664a5da 100644 --- a/editions/tw5.com/tiddlers/widgets/ScrollableWidget.tid +++ b/editions/tw5.com/tiddlers/widgets/ScrollableWidget.tid @@ -1,9 +1,9 @@ +caption: scrollable created: 20140324223413403 -modified: 20150427123524945 +modified: 20220620115347910 tags: Widgets title: ScrollableWidget type: text/vnd.tiddlywiki -caption: scrollable ! Introduction @@ -17,7 +17,7 @@ The content of the `<$scrollable>` widget is displayed within a pair of wrapper |class |The CSS class(es) to be applied to the outer DIV | |fallthrough |See below | -If a scrollable widget can't handle the `tm-scroll` message because the inner DIV fits within the outer DIV, then by default the message falls through to the parent widget. Setting the ''fallthrough'' attribute to `no` prevents this behaviour. +<$macrocall $name=".note" _="""If a scrollable widget can't handle the `tm-scroll` message because the inner DIV fits within the outer DIV, then by default the message falls through to the parent widget. Setting the ''fallthrough'' attribute to `no` prevents this behaviour."""/> ! Examples diff --git a/languages/pl-PL/SideBar.multids b/languages/pl-PL/SideBar.multids index a79c52c51..f1a736bc6 100644 --- a/languages/pl-PL/SideBar.multids +++ b/languages/pl-PL/SideBar.multids @@ -1,5 +1,6 @@ title: $:/language/SideBar/ +Caption: Menu Boczne All/Caption: Wszystkie Contents/Caption: Treści Drafts/Caption: Szkice diff --git a/languages/zh-Hans/EditTemplate.multids b/languages/zh-Hans/EditTemplate.multids index d6d0aca4a..2420eb647 100644 --- a/languages/zh-Hans/EditTemplate.multids +++ b/languages/zh-Hans/EditTemplate.multids @@ -1,5 +1,6 @@ title: $:/language/EditTemplate/ +Caption: 编辑器 Body/External/Hint: 此条目显示保存于主要的 TiddlyWiki 文件之外的内容。你可以编辑其标签和字段,但不能直接编辑内容本身 Body/Placeholder: 输入此条目的内容 Body/Preview/Type/Output: 输出 diff --git a/languages/zh-Hans/Help/default.tid b/languages/zh-Hans/Help/default.tid index c2036cc95..7c3c794b2 100644 --- a/languages/zh-Hans/Help/default.tid +++ b/languages/zh-Hans/Help/default.tid @@ -3,6 +3,7 @@ title: $:/language/Help/default \define commandTitle() $:/language/Help/$(command)$ \end +\whitespace trim ``` 用法: tiddlywiki [