I just as of late discovered that I can tie to the initialisation of the rte editorial manager by utilizing AJS.bind(“init.rte”). I discovered this in the gatherings yet I couldn’t discover any documentation to that. How might I see a total rundown of every single accessible occasion? Similar records for AJS.MacroBrowser.setMacroJsOverride. Is there any documentation for all the javascript techniques for AJS? I was unable to discover any whatsoever.
No.
But there’s two things you can do to find available events:
-
Search/grep the Confluence/Jira source code for
AJS.trigger(
to see all places where AJS events are triggered. -
Or you could kidnap the
AJS.trigger
function and log all calls to it by executing this in your browser console:
(function(originalTriggerFn){
AJS.trigger = function(event, parameter) {
console.log('AJS EVENT TRIGGERED:', event, parameter);
originalTriggerFn(event, parameter);
}
})(AJS.trigger);
Then you will see all triggered events + parameters that are possibly passed into it:
This can also be used to find AJS events of other plugins that you can’t read the source code of.
Cheers,
Sven
5 Likes
Great solution! Is there a similar approach to capture events in Confluence Cloud?