Hi Siniy-Kit, Well, this is the wrong way to do things, I'm sure. It over-rides a core tiddler, $:/core/modules/widgets/fieldmangler.js. So be sure to have backups. I tried using the new sub-class technology, which could have avoided over-riding the core, but the documentation didn't give any explanation of how to include eventListeners in the sub-class. So after more than an hour, this is the best I can do.
Drag and drop the attached into your TW, save and reload. The sample
tiddler "test alert system" has this text:
<$fieldmangler>
<$button>
<$action-sendmessage $message="tm-alert" param1={{!!modified}}
param2={{!!title}}/>
alert M+T
</$button>
</$fieldmangler>
The fieldmangler has been modified to catch the new message, tm-alert. Just
look for "tm-alert" and "handleAlertEvent" to
see what I did.
HTH
--
You received this message because you are subscribed to the Google Groups
"TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/tiddlywiki/303adc4c-46e2-4e87-ad82-097f85bbae81%40googlegroups.com.
alert-message.json
Description: application/json

