> 3) How can I invoke a refresh of the tiddler containing the macro > properly at the end of the plugin?
In general, the line of code that was getting the error *is* the correct way to refresh the "current" tiddler. However, this code depends upon access to an appropriate "DOM element context variable", either 'place' (provided to the macro handler by the TW core) or 'this' (provided by the browser to the onclick event handler). Unfortunately, your code is wrapped in an anonymous function which prevents access to either of those variables and, due to the current indentation (or lack thereof), it's difficult to see exactly what to re-write. Still, I think it's possible to simplify and clean up the code so that the right variable(s) are available at the right time, and then you will be able to restore the call to refreshTiddler(...) > 4) Finally can I disable / enable the autosave as part of the plugin? As part of your onclick handler, you can clear the autosave flag before you modify the tiddlers and then restore the flag and invoke autoSaveChanges() afterwards, like this: config.options.chkAutosave=false; ... insert code here ... config.options.chkAutosave=true; autoSaveChanges(); -e --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "TiddlyWikiDev" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/TiddlyWikiDev?hl=en -~----------~----~----~----~------~----~------~--~---
