1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2024-12-28 11:00:27 +00:00

Restore default filename when saving changes, and make it configurable

Fixes #3630
This commit is contained in:
Jermolene 2018-12-15 15:55:19 +00:00
parent aa1c6a9872
commit a8b8fb3b6f
3 changed files with 27 additions and 1 deletions

View File

@ -4,7 +4,7 @@ caption: {{$:/core/images/save-button}} {{$:/language/Buttons/SaveWiki/Caption}}
description: {{$:/language/Buttons/SaveWiki/Hint}}
<$button tooltip={{$:/language/Buttons/SaveWiki/Hint}} aria-label={{$:/language/Buttons/SaveWiki/Caption}} class=<<tv-config-toolbar-class>>>
<$wikify name="site-title" text="{{$:/SiteTitle}}.html">
<$wikify name="site-title" text={{$:/config/SaveWikiButton/Filename}}>
<$action-sendmessage $message="tm-save-wiki" $param={{$:/config/SaveWikiButton/Template}} filename=<<site-title>>/>
</$wikify>
<span class="tc-dirty-indicator">

View File

@ -0,0 +1,13 @@
created: 20181215154811835
modified: 20181215154811835
tags: [[Hidden Settings]]
title: Hidden Setting: Filename for Save Wiki Button
type: text/vnd.tiddlywiki
<<.from-version "5.1.19">> This value is wikified to determine the filename when saving via the "save wiki" page control button.
By default, this setting is empty, which triggers the default handling where the filename portion of the URL is used.
The value `{{$:/SiteTitle}}.html` causes the filename to be constructed from the site title with a `.html` extension.
$:/config/SaveWikiButton/Filename

View File

@ -0,0 +1,13 @@
created: 20181215154811835
modified: 20181215154811835
tags: [[Hidden Settings]]
title: Hidden Setting: Template for Save Wiki Button
type: text/vnd.tiddlywiki
Determines the template used when saving via the "save wiki" page control button.
Defaults to `$:/core/save/all`.
You can change this setting to choose what is saved when the "save wiki" button is clicked.
$:/config/SaveWikiButton/Template