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

Add means of halting newTiddlerEvent to hook

This commit is contained in:
admls 2019-02-23 18:49:43 +00:00 committed by GitHub
parent 810033bd71
commit 94bd9f2545
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -398,6 +398,9 @@ NavigatorWidget.prototype.handleCancelTiddlerEvent = function(event) {
// If a draft of the target tiddler already exists then it is reused
NavigatorWidget.prototype.handleNewTiddlerEvent = function(event) {
event = $tw.hooks.invokeHook("th-new-tiddler", event);
if(!event) {
return false;
}
// Get the story details
var storyList = this.getStoryList(),
templateTiddler, additionalFields, title, draftTitle, existingTiddler;