mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2024-11-27 12:07:19 +00:00
Added th-editing-tiddler hook in handleEditTiddlerEvent. A plugin can use the hook to return false and prevent editing or provide alternative editing options. (#2901)
This commit is contained in:
parent
2d0ac7245f
commit
48e0186ba9
@ -211,6 +211,10 @@ NavigatorWidget.prototype.handleCloseOtherTiddlersEvent = function(event) {
|
||||
|
||||
// Place a tiddler in edit mode
|
||||
NavigatorWidget.prototype.handleEditTiddlerEvent = function(event) {
|
||||
var editTiddler = $tw.hooks.invokeHook("th-editing-tiddler",event);
|
||||
if(!editTiddler) {
|
||||
return false;
|
||||
}
|
||||
var self = this;
|
||||
function isUnmodifiedShadow(title) {
|
||||
return self.wiki.isShadowTiddler(title) && !self.wiki.tiddlerExists(title);
|
||||
|
Loading…
Reference in New Issue
Block a user