mirror of
				https://github.com/Jermolene/TiddlyWiki5
				synced 2025-10-31 15:42:59 +00:00 
			
		
		
		
	LinkCatcherWidget: Add variable containing target tiddler
This commit is contained in:
		| @@ -82,7 +82,7 @@ LinkCatcherWidget.prototype.handleNavigateEvent = function(event) { | ||||
| 		this.wiki.addTiddler(new $tw.Tiddler(tiddler,{title: this.catchSet, text: this.catchSetTo})); | ||||
| 	} | ||||
| 	if(this.catchActions) { | ||||
| 		this.invokeActionString(this.catchActions,this); | ||||
| 		this.invokeActionString(this.catchActions,this,event,{navigateTo: event.navigateTo}); | ||||
| 	} | ||||
| 	return false; | ||||
| }; | ||||
|   | ||||
| @@ -1,9 +1,9 @@ | ||||
| caption: linkcatcher | ||||
| created: 20131024141900000 | ||||
| modified: 20140409074643650 | ||||
| modified: 20170707111536556 | ||||
| tags: Widgets | ||||
| title: LinkCatcherWidget | ||||
| type: text/vnd.tiddlywiki | ||||
| caption: linkcatcher | ||||
|  | ||||
| ! Introduction | ||||
|  | ||||
| @@ -12,6 +12,7 @@ The link catcher widget traps [[WidgetMessage: tm-navigate]] dispatched within i | ||||
| * sending a different widget message | ||||
| * setting a tiddler to the title of the navigated tiddler | ||||
| * setting a tiddler to a specified value | ||||
| * performing a series of ActionWidgets | ||||
|  | ||||
| ! Content and Attributes | ||||
|  | ||||
| @@ -22,3 +23,5 @@ The content of the `<$linkcatcher>` widget is displayed normally. | ||||
| |message |Optional identifier for a [[widget message|Messages]] to be sent when a navigation is caught  | | ||||
| |set |Optional title of the tiddler to be set to a specified value when navigation occurs | | ||||
| |setTo |Value to be assigned by the `set` attribute | | ||||
| |actions |Actions to be performed when a link is caught. Within the action string, the variable "navigateTo" contains the title of the tiddler being navigated | | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Jermolene
					Jermolene