From cc1acdaf74853a4d77d7be5178709fec039a31af Mon Sep 17 00:00:00 2001 From: Jermolene Date: Mon, 3 Aug 2015 08:43:21 +0100 Subject: [PATCH 1/8] Add ko-KR and sv-SE to translators edition --- editions/translators/tiddlywiki.info | 2 ++ .../tiddlers/images/external/tiddlywiki.files | 18 ++++++++++++++++++ 2 files changed, 20 insertions(+) diff --git a/editions/translators/tiddlywiki.info b/editions/translators/tiddlywiki.info index 7f047d5ee..8e4dc295a 100644 --- a/editions/translators/tiddlywiki.info +++ b/editions/translators/tiddlywiki.info @@ -18,11 +18,13 @@ "ia-IA", "it-IT", "ja-JP", + "ko-KR", "nl-NL", "pa-IN", "pt-PT", "ru-RU", "sk-SK", + "sv-SE", "zh-Hans", "zh-Hant" ], diff --git a/editions/tw5.com/tiddlers/images/external/tiddlywiki.files b/editions/tw5.com/tiddlers/images/external/tiddlywiki.files index c81bd8c15..88b68ebd8 100644 --- a/editions/tw5.com/tiddlers/images/external/tiddlywiki.files +++ b/editions/tw5.com/tiddlers/images/external/tiddlywiki.files @@ -108,6 +108,15 @@ "tags": "Language Icon" } }, + { + "file": "../../../../../languages/ko-KR/icon.tid", + "isTiddlerFile": true, + "fields": { + "title": "Language Icon: ko-KR", + "language": "ko-KR", + "tags": "Language Icon" + } + }, { "file": "../../../../../languages/nl-NL/icon.tid", "isTiddlerFile": true, @@ -153,6 +162,15 @@ "tags": "Language Icon" } }, + { + "file": "../../../../../languages/sv-SE/icon.tid", + "isTiddlerFile": true, + "fields": { + "title": "Language Icon: sv-SE", + "language": "sv-SE", + "tags": "Language Icon" + } + }, { "file": "../../../../../languages/zh-Hans/icon.tid", "isTiddlerFile": true, From 8b9e790e69da0e02551d5026483396c3e42a4695 Mon Sep 17 00:00:00 2001 From: Jermolene Date: Mon, 3 Aug 2015 09:13:36 +0100 Subject: [PATCH 2/8] Improve text slicer docs --- editions/text-slicer/tiddlers/HelloThere.tid | 12 ++++----- plugins/tiddlywiki/text-slicer/docs.tid | 26 ++++++++++++++++++++ plugins/tiddlywiki/text-slicer/plugin.info | 2 +- plugins/tiddlywiki/text-slicer/readme.tid | 2 ++ 4 files changed, 35 insertions(+), 7 deletions(-) create mode 100644 plugins/tiddlywiki/text-slicer/docs.tid diff --git a/editions/text-slicer/tiddlers/HelloThere.tid b/editions/text-slicer/tiddlers/HelloThere.tid index ea6d861b9..60e371c13 100644 --- a/editions/text-slicer/tiddlers/HelloThere.tid +++ b/editions/text-slicer/tiddlers/HelloThere.tid @@ -2,7 +2,9 @@ title: HelloThere This edition of ~TiddlyWiki contains tools to help slice up long texts into individual tiddlers. -//It is currently only intended for advanced users. The tools are in the early stages of development, and likely to need some customisation to do what you need.// +//''This plugin is under active development, and is subject to change in the future''. It is currently only intended for advanced users. The tools are in the early stages of development, and likely to need some customisation to do what you need.// + +! Usage The source document must first be marked up as an ordinary wikitext tiddler. Currently only the following formatting is recognised: @@ -16,10 +18,8 @@ To try it out: # Click the ''import'' button in the resulting import listing # Open the tiddler [[Sliced up Sample Text]] #* It should match the content of [[Sample Text]] +#* The table of contents at the top allows the structure to be explored -The table of contents at the top of the output tiddler shows how the document has been split up into individual tiddlers: +! Plugin Instructions -* A tiddler for each heading, with the children of the heading tagged with the title of the heading -* A tiddler for each paragraph -* A tiddler for each list, and a tiddler for each list item -* The list field of tag tiddlers is used to control ordering of children +{{$:/plugins/tiddlywiki/text-slicer/docs}} diff --git a/plugins/tiddlywiki/text-slicer/docs.tid b/plugins/tiddlywiki/text-slicer/docs.tid new file mode 100644 index 000000000..336b0e2a3 --- /dev/null +++ b/plugins/tiddlywiki/text-slicer/docs.tid @@ -0,0 +1,26 @@ +title: $:/plugins/tiddlywiki/text-slicer/docs + +!! Text Slicing Approach + +Individual tiddlers are created for each heading, paragraph and list item. They are linked together using TiddlyWiki's tagging mechanism. + +For example, consider a tiddler titled ''Example'' containing this simple text: + +<<< +! This is a heading + +This is a paragraph. + +* And the first list item +* Second list item +<<< + +It will be sliced up into: + +* a tiddler for the overall document +** a tiddler for the heading +*** a tiddler for the paragraph +*** a tiddler for the list +**** and a tiddler for each list item + +These tiddlers are bound together using tagging: child tiddlers are tagged with the title of their parent, and the parent tiddler has a ''list'' field that lists each child in the correct order. diff --git a/plugins/tiddlywiki/text-slicer/plugin.info b/plugins/tiddlywiki/text-slicer/plugin.info index d45d1c3e4..97c06fd5c 100644 --- a/plugins/tiddlywiki/text-slicer/plugin.info +++ b/plugins/tiddlywiki/text-slicer/plugin.info @@ -3,5 +3,5 @@ "description": "Tools for slicing text into tiddlers", "author": "JeremyRuston", "core-version": ">=5.0.0", - "list": "readme" + "list": "readme docs" } diff --git a/plugins/tiddlywiki/text-slicer/readme.tid b/plugins/tiddlywiki/text-slicer/readme.tid index a3859bf93..058a3efb9 100644 --- a/plugins/tiddlywiki/text-slicer/readme.tid +++ b/plugins/tiddlywiki/text-slicer/readme.tid @@ -1,3 +1,5 @@ title: $:/plugins/tiddlywiki/text-slicer/readme +//''This plugin is under active development, and is subject to change in the future''. It is currently only intended for advanced users. The tools are in the early stages of development, and likely to need some customisation to do what you need.// + This plugin contains tools to help slice up long texts into individual tiddlers. From 2e5c50030010df29dc715650ab282cf85bc422d6 Mon Sep 17 00:00:00 2001 From: Jermolene Date: Mon, 3 Aug 2015 09:13:45 +0100 Subject: [PATCH 3/8] Fix slice button tooltip --- plugins/tiddlywiki/text-slicer/slice-button.tid | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/plugins/tiddlywiki/text-slicer/slice-button.tid b/plugins/tiddlywiki/text-slicer/slice-button.tid index 371b15f17..e82c6f8be 100644 --- a/plugins/tiddlywiki/text-slicer/slice-button.tid +++ b/plugins/tiddlywiki/text-slicer/slice-button.tid @@ -3,7 +3,11 @@ tags: $:/tags/ViewToolbar caption: {{$:/plugins/tiddlywiki/text-slicer/text-slicer-icon}} Slice tiddler description: Slice this tiddler by headings and lists -<$button message="tm-slice-tiddler" param=<> tooltip={{$:/language/Buttons/Clone/Hint}} aria-label={{$:/language/Buttons/Clone/Caption}} class=<>> +\define hint() +Slice this tiddler by headings and lists +\end + +<$button message="tm-slice-tiddler" param=<> tooltip=<> aria-label=<> class=<>> <$list filter="[prefix[yes]]"> {{$:/plugins/tiddlywiki/text-slicer/text-slicer-icon}} From 898e992694f242a1b107d949951d8e647da791d1 Mon Sep 17 00:00:00 2001 From: Jermolene Date: Mon, 3 Aug 2015 15:10:35 +0100 Subject: [PATCH 4/8] Improvements to text-slicer plugin 1. Introduce template tiddlers for the document, each tiddler, and the tiddler toolbar 2. Move the text slicer toolbar button to the left of the edit button 3. Add a selectable toolbar, currently just containing the tiddler title --- plugins/tiddlywiki/text-slicer/macros.tid | 8 ++----- .../tiddlywiki/text-slicer/slice-button.tid | 1 + plugins/tiddlywiki/text-slicer/slicer.js | 2 +- .../text-slicer/template-display-document.tid | 21 +++++++++++++++++++ .../text-slicer/template-display-tiddler.tid | 6 ++++++ .../text-slicer/template-tiddler-toolbar.tid | 5 +++++ 6 files changed, 36 insertions(+), 7 deletions(-) create mode 100644 plugins/tiddlywiki/text-slicer/template-display-document.tid create mode 100644 plugins/tiddlywiki/text-slicer/template-display-tiddler.tid create mode 100644 plugins/tiddlywiki/text-slicer/template-tiddler-toolbar.tid diff --git a/plugins/tiddlywiki/text-slicer/macros.tid b/plugins/tiddlywiki/text-slicer/macros.tid index bcba9bc62..fb1c0f41f 100644 --- a/plugins/tiddlywiki/text-slicer/macros.tid +++ b/plugins/tiddlywiki/text-slicer/macros.tid @@ -1,15 +1,11 @@ title: $:/plugins/tiddlywiki/text-slicer/macros tags: $:/tags/Macro -\define display-tiddler() -<$list filter="[draft.oflimit[1]]" editTemplate="$:/core/ui/EditTemplate" emptyMessage="""<$transclude mode='block'/>"""/> -\end - \define display-heading-tiddler(level:"h1") <$level$><$view field="title"/> <$list filter='[tag!has[draft.of]]'> <$tiddler> -<> +{{||$:/plugins/tiddlywiki/text-slicer/templates/display-tiddler}} \end @@ -19,7 +15,7 @@ tags: $:/tags/Macro <$list filter='[tag!has[draft.of]]'>
  • <$tiddler> -<> +{{||$:/plugins/tiddlywiki/text-slicer/templates/display-tiddler}}
  • diff --git a/plugins/tiddlywiki/text-slicer/slice-button.tid b/plugins/tiddlywiki/text-slicer/slice-button.tid index e82c6f8be..2ce65e615 100644 --- a/plugins/tiddlywiki/text-slicer/slice-button.tid +++ b/plugins/tiddlywiki/text-slicer/slice-button.tid @@ -1,5 +1,6 @@ title: $:/plugins/tiddlywiki/text-slicer/ui/slice-button tags: $:/tags/ViewToolbar +list-before: $:/core/ui/Buttons/edit caption: {{$:/plugins/tiddlywiki/text-slicer/text-slicer-icon}} Slice tiddler description: Slice this tiddler by headings and lists diff --git a/plugins/tiddlywiki/text-slicer/slicer.js b/plugins/tiddlywiki/text-slicer/slicer.js index 10f2013af..51a38360e 100644 --- a/plugins/tiddlywiki/text-slicer/slicer.js +++ b/plugins/tiddlywiki/text-slicer/slicer.js @@ -121,7 +121,7 @@ function sliceTiddler(title) { if(parser) { parentStack.push({type: "h0", title: addTiddler({ title: "Sliced up " + title, - text: "
    \n\n<>\n\n
    \n<>", + text: "{{||$:/plugins/tiddlywiki/text-slicer/templates/display-document}}", list: [] })}); processNodeList(parser.tree); diff --git a/plugins/tiddlywiki/text-slicer/template-display-document.tid b/plugins/tiddlywiki/text-slicer/template-display-document.tid new file mode 100644 index 000000000..c2344b1c3 --- /dev/null +++ b/plugins/tiddlywiki/text-slicer/template-display-document.tid @@ -0,0 +1,21 @@ +title: $:/plugins/tiddlywiki/text-slicer/templates/display-document + +\define config-show-toolbar() +$:/plugins/tiddlywiki/text-slicer/config/show-toolbar/$(currentTiddler)$ +\end + +\define display-tiddler() +<$set name="tv-show-toolbar" value={{$(config-show-toolbar)$}}> +<> + +\end + +
    + +<$macrocall $name="toc-selective-expandable" tag=<>/> + +
    + +<$checkbox tiddler=<> field="text" checked="yes" unchecked="no" default="no"> Show toolbar + +<> diff --git a/plugins/tiddlywiki/text-slicer/template-display-tiddler.tid b/plugins/tiddlywiki/text-slicer/template-display-tiddler.tid new file mode 100644 index 000000000..0a4023560 --- /dev/null +++ b/plugins/tiddlywiki/text-slicer/template-display-tiddler.tid @@ -0,0 +1,6 @@ +title: $:/plugins/tiddlywiki/text-slicer/templates/display-tiddler + +<$list filter="[prefix[yes]]" variable="hasToolbar"> +{{||$:/plugins/tiddlywiki/text-slicer/templates/tiddler-toolbar}} + +<$list filter="[draft.oflimit[1]]" editTemplate="$:/core/ui/EditTemplate" emptyMessage="""<$transclude mode='block'/>"""/> diff --git a/plugins/tiddlywiki/text-slicer/template-tiddler-toolbar.tid b/plugins/tiddlywiki/text-slicer/template-tiddler-toolbar.tid new file mode 100644 index 000000000..68c603fcb --- /dev/null +++ b/plugins/tiddlywiki/text-slicer/template-tiddler-toolbar.tid @@ -0,0 +1,5 @@ +title: $:/plugins/tiddlywiki/text-slicer/templates/tiddler-toolbar + +
    +<$link><$text text=<>/> +
    From dd1f82c1aa27fdd9c9f026033b90d01a92fee844 Mon Sep 17 00:00:00 2001 From: Jermolene Date: Mon, 3 Aug 2015 17:09:48 +0100 Subject: [PATCH 5/8] Improve the text-slicer icon --- .../text-slicer/text-slicer-icon.tid | 32 +++++++++++-------- 1 file changed, 18 insertions(+), 14 deletions(-) diff --git a/plugins/tiddlywiki/text-slicer/text-slicer-icon.tid b/plugins/tiddlywiki/text-slicer/text-slicer-icon.tid index 41b6496c3..da95b8a85 100644 --- a/plugins/tiddlywiki/text-slicer/text-slicer-icon.tid +++ b/plugins/tiddlywiki/text-slicer/text-slicer-icon.tid @@ -3,19 +3,23 @@ tags: $:/tags/Image - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + - \ No newline at end of file + From 535d8d6fa0caafa3f8d44c6f28c7a919dfce64f8 Mon Sep 17 00:00:00 2001 From: Jermolene Date: Tue, 4 Aug 2015 08:04:57 +0100 Subject: [PATCH 6/8] Stop using an import tiddler for text slicer MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Instead we directly output the tiddlers (we keep the old code around; later we’ll make the output mode switchable). Also improve the icon --- editions/text-slicer/tiddlers/HelloThere.tid | 3 +- plugins/tiddlywiki/text-slicer/slicer.js | 19 ++++++++++-- .../text-slicer/text-slicer-icon.tid | 30 +++++++++---------- 3 files changed, 31 insertions(+), 21 deletions(-) diff --git a/editions/text-slicer/tiddlers/HelloThere.tid b/editions/text-slicer/tiddlers/HelloThere.tid index 60e371c13..1a933f955 100644 --- a/editions/text-slicer/tiddlers/HelloThere.tid +++ b/editions/text-slicer/tiddlers/HelloThere.tid @@ -15,8 +15,7 @@ The source document must first be marked up as an ordinary wikitext tiddler. Cur To try it out: # Click the "text slicer" icon on the [[Sample Text]] tiddler below -# Click the ''import'' button in the resulting import listing -# Open the tiddler [[Sliced up Sample Text]] +# View the tiddler [[Sliced up Sample Text]] #* It should match the content of [[Sample Text]] #* The table of contents at the top allows the structure to be explored diff --git a/plugins/tiddlywiki/text-slicer/slicer.js b/plugins/tiddlywiki/text-slicer/slicer.js index 51a38360e..b0e96846b 100644 --- a/plugins/tiddlywiki/text-slicer/slicer.js +++ b/plugins/tiddlywiki/text-slicer/slicer.js @@ -24,7 +24,7 @@ var SLICER_OUTPUT_TITLE = "$:/TextSlicer"; exports.startup = function() { $tw.rootWidget.addEventListener("tm-slice-tiddler",function(event) { // Slice up and output the tiddler - outputTiddlers(sliceTiddler(event.param),event.param); + outputTiddlers(sliceTiddler(event.param),event.param,event.param); }); }; @@ -129,8 +129,21 @@ function sliceTiddler(title) { return tiddlers; } -// Output to the output tiddler -function outputTiddlers(tiddlers,navigateFromTitle) { +// Output directly to the output tiddlers +function outputTiddlers(tiddlers,title,navigateFromTitle) { + $tw.utils.each(tiddlers,function(tiddlerFields) { + var title = tiddlerFields.title; + if(title) { + $tw.wiki.addTiddler(new $tw.Tiddler($tw.wiki.getCreationFields(),tiddlerFields,$tw.wiki.getModificationFields())); + } + }); + // Navigate to output + var story = new $tw.Story({wiki: $tw.wiki}); + story.navigateTiddler("Sliced up " + title,navigateFromTitle); +} + +// Output via an import tiddler +function outputTiddlers_viaImportTiddler(tiddlers,navigateFromTitle) { // Get the current slicer output tiddler var slicerOutputTiddler = $tw.wiki.getTiddler(SLICER_OUTPUT_TITLE), slicerOutputData = $tw.wiki.getTiddlerData(SLICER_OUTPUT_TITLE,{}), diff --git a/plugins/tiddlywiki/text-slicer/text-slicer-icon.tid b/plugins/tiddlywiki/text-slicer/text-slicer-icon.tid index da95b8a85..369bb26a2 100644 --- a/plugins/tiddlywiki/text-slicer/text-slicer-icon.tid +++ b/plugins/tiddlywiki/text-slicer/text-slicer-icon.tid @@ -3,22 +3,20 @@ tags: $:/tags/Image - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + From be0ebfeeae00c01d428fbd0a28552e85dbad8550 Mon Sep 17 00:00:00 2001 From: Jermolene Date: Tue, 4 Aug 2015 17:34:28 +0100 Subject: [PATCH 7/8] Make the text slicer tiddler toolbar be tag-driven --- plugins/tiddlywiki/text-slicer/template-tiddler-toolbar.tid | 2 +- plugins/tiddlywiki/text-slicer/toolbar-title.tid | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) create mode 100644 plugins/tiddlywiki/text-slicer/toolbar-title.tid diff --git a/plugins/tiddlywiki/text-slicer/template-tiddler-toolbar.tid b/plugins/tiddlywiki/text-slicer/template-tiddler-toolbar.tid index 68c603fcb..7494c6020 100644 --- a/plugins/tiddlywiki/text-slicer/template-tiddler-toolbar.tid +++ b/plugins/tiddlywiki/text-slicer/template-tiddler-toolbar.tid @@ -1,5 +1,5 @@ title: $:/plugins/tiddlywiki/text-slicer/templates/tiddler-toolbar
    -<$link><$text text=<>/> +<$list filter="[all[shadows+tiddlers]tag[$:/tags/TextSlicerToolbar]!has[draft.of]]" variable="listItem"><$transclude tiddler=<>/>
    diff --git a/plugins/tiddlywiki/text-slicer/toolbar-title.tid b/plugins/tiddlywiki/text-slicer/toolbar-title.tid new file mode 100644 index 000000000..21c652be6 --- /dev/null +++ b/plugins/tiddlywiki/text-slicer/toolbar-title.tid @@ -0,0 +1,4 @@ +title: $:/plugins/tiddlywiki/text-slicer/toolbar/title +tags: $:/tags/TextSlicerToolbar + +<$link><$text text=<>/> From 72ed4b26731dd3bbac948af6965b050f33ed1c1c Mon Sep 17 00:00:00 2001 From: Jermolene Date: Tue, 4 Aug 2015 17:44:07 +0100 Subject: [PATCH 8/8] Add renaming to text-slicer tiddler toolbar The plan is to expose the functionality in other places, too - for example, the edit template and the tag manager --- core/modules/startup/bulkops.js | 28 ++++++++++ core/modules/wiki-bulkops.js | 53 +++++++++++++++++++ editions/text-slicer/tiddlers/HelloThere.tid | 4 +- .../text-slicer/tag-TextSlicerToolbar.tid | 3 ++ .../tiddlywiki/text-slicer/toolbar-rename.tid | 16 ++++++ 5 files changed, 103 insertions(+), 1 deletion(-) create mode 100644 core/modules/startup/bulkops.js create mode 100644 core/modules/wiki-bulkops.js create mode 100644 plugins/tiddlywiki/text-slicer/tag-TextSlicerToolbar.tid create mode 100644 plugins/tiddlywiki/text-slicer/toolbar-rename.tid diff --git a/core/modules/startup/bulkops.js b/core/modules/startup/bulkops.js new file mode 100644 index 000000000..d70afadaa --- /dev/null +++ b/core/modules/startup/bulkops.js @@ -0,0 +1,28 @@ +/*\ +title: $:/core/modules/startup/bulkops.js +type: application/javascript +module-type: startup + +Support for bulk tiddler operations + +\*/ +(function(){ + +/*jslint node: true, browser: true */ +/*global $tw: false */ +"use strict"; + +// Export name and synchronous status +exports.name = "bulkops"; +exports.platforms = ["browser"]; +exports.after = ["startup"]; +exports.synchronous = true; + +exports.startup = function() { + $tw.rootWidget.addEventListener("tm-rename-tiddler",function(event) { + var paramObject = event.paramObject || {}; + $tw.wiki.renameTiddler(paramObject.from,paramObject.to); + }); +}; + +})(); diff --git a/core/modules/wiki-bulkops.js b/core/modules/wiki-bulkops.js new file mode 100644 index 000000000..ce72f1c99 --- /dev/null +++ b/core/modules/wiki-bulkops.js @@ -0,0 +1,53 @@ +/*\ +title: $:/core/modules/wiki-bulkops.js +type: application/javascript +module-type: wikimethod + +Bulk tiddler operations such as rename. + +\*/ +(function(){ + +/*jslint node: true, browser: true */ +/*global $tw: false */ +"use strict"; + +/* +Rename a tiddler, and relink any tags or lists that reference it. +*/ +exports.renameTiddler = function(fromTitle,toTitle) { + var self = this; + fromTitle = (fromTitle || "").trim(); + toTitle = (toTitle || "").trim(); + if(fromTitle && toTitle && fromTitle !== toTitle) { + // Rename the tiddler itself + var tiddler = this.getTiddler(fromTitle); + this.addTiddler(new $tw.Tiddler(tiddler,{title: toTitle},this.getModificationFields())); + this.deleteTiddler(fromTitle); + // Rename any tags or lists that reference it + this.each(function(tiddler,title) { + var tags = (tiddler.fields.tags || []).slice(0), + list = (tiddler.fields.list || []).slice(0), + isModified = false; + // Rename tags + $tw.utils.each(tags,function (title,index) { + if(title === fromTitle) { + tags[index] = toTitle; + isModified = true; + } + }); + // Rename lists + $tw.utils.each(list,function (title,index) { + if(title === fromTitle) { + list[index] = toTitle; + isModified = true; + } + }); + if(isModified) { + self.addTiddler(new $tw.Tiddler(tiddler,{tags: tags, list: list},self.getModificationFields())); + } + }); + } +} + +})(); diff --git a/editions/text-slicer/tiddlers/HelloThere.tid b/editions/text-slicer/tiddlers/HelloThere.tid index 1a933f955..24d2d6438 100644 --- a/editions/text-slicer/tiddlers/HelloThere.tid +++ b/editions/text-slicer/tiddlers/HelloThere.tid @@ -14,10 +14,12 @@ The source document must first be marked up as an ordinary wikitext tiddler. Cur To try it out: -# Click the "text slicer" icon on the [[Sample Text]] tiddler below +# Click the ''text slicer'' icon on the [[Sample Text]] tiddler below # View the tiddler [[Sliced up Sample Text]] #* It should match the content of [[Sample Text]] #* The table of contents at the top allows the structure to be explored +# Click the ''Show toolbar'' checkbox to display a simple toolbar for each tiddler +# Use the text box and the ''rename'' button to rename tiddlers without breaking the tagging links ! Plugin Instructions diff --git a/plugins/tiddlywiki/text-slicer/tag-TextSlicerToolbar.tid b/plugins/tiddlywiki/text-slicer/tag-TextSlicerToolbar.tid new file mode 100644 index 000000000..ef2f27cd4 --- /dev/null +++ b/plugins/tiddlywiki/text-slicer/tag-TextSlicerToolbar.tid @@ -0,0 +1,3 @@ +title: $:/tags/TextSlicerToolbar +list: $:/plugins/tiddlywiki/text-slicer/toolbar/title $:/plugins/tiddlywiki/text-slicer/toolbar/rename + diff --git a/plugins/tiddlywiki/text-slicer/toolbar-rename.tid b/plugins/tiddlywiki/text-slicer/toolbar-rename.tid new file mode 100644 index 000000000..a11f10bbd --- /dev/null +++ b/plugins/tiddlywiki/text-slicer/toolbar-rename.tid @@ -0,0 +1,16 @@ +title: $:/plugins/tiddlywiki/text-slicer/toolbar/rename +tags: $:/tags/TextSlicerToolbar + +\define renameProxyTitle() +$:/config/plugins/tiddlywiki/text-slicer/rename-$(currentTiddler)$ +\end + +\define body() +<$edit-text tag="input" tiddler=<> placeholder="Rename" default=<>/> +<$button> +<$action-sendmessage $message="tm-rename-tiddler" from=<> to={{$(renameProxyTitle)$}}/> +rename + +\end + +<> \ No newline at end of file