mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2024-06-24 06:13:17 +00:00
LinkCatcherWidget: Add variable containing target tiddler
This commit is contained in:
parent
16d867d380
commit
dc295b2536
|
@ -82,7 +82,7 @@ LinkCatcherWidget.prototype.handleNavigateEvent = function(event) {
|
||||||
this.wiki.addTiddler(new $tw.Tiddler(tiddler,{title: this.catchSet, text: this.catchSetTo}));
|
this.wiki.addTiddler(new $tw.Tiddler(tiddler,{title: this.catchSet, text: this.catchSetTo}));
|
||||||
}
|
}
|
||||||
if(this.catchActions) {
|
if(this.catchActions) {
|
||||||
this.invokeActionString(this.catchActions,this);
|
this.invokeActionString(this.catchActions,this,event,{navigateTo: event.navigateTo});
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
};
|
};
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
|
caption: linkcatcher
|
||||||
created: 20131024141900000
|
created: 20131024141900000
|
||||||
modified: 20140409074643650
|
modified: 20170707111536556
|
||||||
tags: Widgets
|
tags: Widgets
|
||||||
title: LinkCatcherWidget
|
title: LinkCatcherWidget
|
||||||
type: text/vnd.tiddlywiki
|
type: text/vnd.tiddlywiki
|
||||||
caption: linkcatcher
|
|
||||||
|
|
||||||
! Introduction
|
! Introduction
|
||||||
|
|
||||||
|
@ -12,6 +12,7 @@ The link catcher widget traps [[WidgetMessage: tm-navigate]] dispatched within i
|
||||||
* sending a different widget message
|
* sending a different widget message
|
||||||
* setting a tiddler to the title of the navigated tiddler
|
* setting a tiddler to the title of the navigated tiddler
|
||||||
* setting a tiddler to a specified value
|
* setting a tiddler to a specified value
|
||||||
|
* performing a series of ActionWidgets
|
||||||
|
|
||||||
! Content and Attributes
|
! 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 |
|
|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 |
|
|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 |
|
|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 |
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user