1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2024-11-29 21:09:56 +00:00

Adding a setting for default type so that it can be overridden for other wikis.

This commit is contained in:
Michael McDermott 2024-11-25 11:16:37 -06:00
parent 6fc02aa0c7
commit 07e56fd09e
3 changed files with 8 additions and 1 deletions

View File

@ -277,7 +277,8 @@ NavigatorWidget.prototype.makeDraftTiddler = function(targetTitle) {
}
// Get the current value of the tiddler we're editing
var tiddler = this.wiki.getTiddler(targetTitle);
var defaultFields = { type: "text/markdown" };
var defaultType = this.wiki.getTiddler("$:/config/DefaultMissingType");
var defaultFields = { type: defaultType !== null ? defaultType.fields['text'].trim() : "" };
// Save the initial value of the draft tiddler
draftTitle = this.generateDraftTitle(targetTitle);
var draftTiddler = new $tw.Tiddler({

View File

@ -0,0 +1,3 @@
title: $:/config/DefaultMissingType

View File

@ -0,0 +1,3 @@
title: $:/config/DefaultMissingType
text/markdown