mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2024-11-23 10:07:19 +00:00
commit
d4baf515ed
@ -323,10 +323,11 @@ NavigatorWidget.prototype.handleCancelTiddlerEvent = function(event) {
|
||||
NavigatorWidget.prototype.handleNewTiddlerEvent = function(event) {
|
||||
// Get the story details
|
||||
var storyList = this.getStoryList();
|
||||
var newTiddlerTitle = event.param || "New Tiddler";
|
||||
// Get the template tiddler if there is one
|
||||
var templateTiddler = this.wiki.getTiddler(event.param);
|
||||
var templateTiddler = this.wiki.getTiddler(newTiddlerTitle);
|
||||
// Create the new tiddler
|
||||
var title = this.wiki.generateNewTitle((templateTiddler && templateTiddler.fields.title) || "New Tiddler");
|
||||
var title = this.wiki.generateNewTitle((templateTiddler && templateTiddler.fields.title) || newTiddlerTitle);
|
||||
var tiddler = new $tw.Tiddler(this.wiki.getCreationFields(),{
|
||||
text: "Newly created tiddler",
|
||||
title: title
|
||||
|
Loading…
Reference in New Issue
Block a user