onChangeToken: Difference between revisions
Jump to navigation
Jump to search
m (Conversion script moved page onChangeToken to OnChangeToken without leaving a redirect: Converting page title to first-letter uppercase) |
m (Conversion script moved page OnChangeToken to onChangeToken: Converting page titles to lowercase) |
(No difference)
|
Revision as of 23:48, 9 February 2023
This event is triggered whenever a token is changed.
As a frame-based event, a frame containing the event code has to be opened.
This event can be tricky. It can be fired many times, and can result in loops if the event handler goes on to itself modify tokens.
Set up
Create a frame that has this special html tag in it:
<link rel='onChangeToken' type='macro' href='macroLink'>
Replace macroLink
by an actual macroLinkText-call to a macro of your choice (the returned value of macroLinkText()).
The changed token's ID is passed to the macro as the value of macro.args
.