Specifications
DOCUMENT_SAVED Â
TAG_ADDED TAG_REMOVED Â
DID_ADD_TAG Â
QUICKLOOK_DID_RESIZE_PANEL Â
QUICKLOOK_DID_PAN_PREVIEW Â
QUICKLOOK_DID_DOWNLOAD_ATTACHMENT Â
DID_FINISH_EDITING Â
AUTHENTICATED DID_ADD_COMMENT Â
DID_LOAD_PAGE_CONTENT Â
QUICKLOOK_DID_LEAVE_FULLSCREEN Â
QUICKLOOK_DID_ENTER_FULLSCREEN Â
DID_ATTACH_FILE Â
AUTHENTICATED LOGGED_OUT Â
DID_REMOVE_TAG Â
DID_UNSTAR_PAGE DID_REMOVE_COMMENT Â
DID_MODERATE_COMMENT DID_STAR_PAGE Â
DID_GET_SIDEBAR_CONTENT Â
DID_INSERT_MEDIA Â
The following example shared instance calls a function when the user starts editing
a page:
var MyPluginClass = Class.createWithSharedInstance('myPluginClass',
true);
MyPluginClass.prototype =
{
initialize: function()
{
publisher().subscribe(this.startedEditing, 'DID_START_EDITING');
},
startedEditing: function(msg, obj, info)
{
// Add code here
}
}
The initialize method tells the publisher() shared instance to listen for a message using
publisher().subscribe.
50 Chapter 3 Customizing How the Wiki Looks