mirror of
				https://github.com/Jermolene/TiddlyWiki5
				synced 2025-10-31 15:42:59 +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:
		| @@ -211,6 +211,10 @@ NavigatorWidget.prototype.handleCloseOtherTiddlersEvent = function(event) { | |||||||
|  |  | ||||||
| // Place a tiddler in edit mode | // Place a tiddler in edit mode | ||||||
| NavigatorWidget.prototype.handleEditTiddlerEvent = function(event) { | NavigatorWidget.prototype.handleEditTiddlerEvent = function(event) { | ||||||
|  | 	var editTiddler = $tw.hooks.invokeHook("th-editing-tiddler",event); | ||||||
|  | 	if(!editTiddler) { | ||||||
|  | 		return false; | ||||||
|  | 	} | ||||||
| 	var self = this; | 	var self = this; | ||||||
| 	function isUnmodifiedShadow(title) { | 	function isUnmodifiedShadow(title) { | ||||||
| 		return self.wiki.isShadowTiddler(title) && !self.wiki.tiddlerExists(title); | 		return self.wiki.isShadowTiddler(title) && !self.wiki.tiddlerExists(title); | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 saqimtiaz
					saqimtiaz