How to embed a widget in a wiki page > WikiBlock Execution Paths
// Initialization
WikiBlockPlugin(CPluginAPI) -> WikiBlockPlugin(CPluginAPI, WikiBlockManager)
WikiBlockPlugin.AddWikiBlock(sId, type->WikiBlock)
WikiBlockManager.AddWikiBlock(sId, type->WikiBlock)
// Wiki Page Display (view mode)
WikiBlockPlugin.WikiPageDisplayView
WikiBlockManager.WikiPageDisplayView
ProcessWikiBlockTags(RenderingMode.View)
GetWikiBlockInfoFromPersistedRegexMatch
GetWikiBlockInstanceFromWikiBlockInfo
WikiBlock.InitFromDictionary
Set WikiBlockWithContent.Content
RenderWikiBlock(RenderingMode.View)
WikiBlock.ViewHtml
// Wiki Page Display (edit mode)
WikiBlockPlugin.WysiwygInsertMenuLinks
WikiBlockManager.WysiwygInsertMenuLinks
WikiBlock.InitFromDictionary
Set WikiBlockWithContent.Content
WikiBlock.GetWikiBlockDisplayName
WikiBlockPlugin.WysiwygContextMenuLinks
WikiBlockManager.WysiwygContextMenuLinks
WikiBlock.InitFromDictionary
Set WikiBlockWithContent.Content
WikiBlock.GetWikiBlockDisplayName + " Properties..."
WikiBlockPlugin.WikiPageDisplayEdit
WikiBlockManager.WikiPageDisplayEdit
ProcessWikiBlockTags(RenderingMode.Edit)
GetWikiBlockInfoFromPersistedRegexMatch
GetWikiBlockInstanceFromWikiBlockInfo
WikiBlock.InitFromDictionary
Set WikiBlockWithContent.Content
RenderWikiBlock(RenderingMode.Edit)
Functions.GenerateWikiBlockClientSideTag
// if this wiki block's insert menu item is clicked
WikiBlockPlugin.WysiwygInsertMenuDialogDisplay
WikiBlockManager.WysiwygInsertMenuDialogDisplay
WysiwygDialogHandler
WikiBlock.InitFromDictionary (with empty dictionary)
Set WikiBlockWithContent.Content
(fDialogSubmit)
WikiBlock.ParseDialogSubmit
WikiBlock.InitFromDictionary
WikiBlock.ValidateData
(success)
return null (no more dialog to display)
(!success)
return WikiBlock.DialogHtml
WikiBlock.GetDialog
(!fDialogSubmit)
WikiBlock.ValidateData
return WikiBlock.DialogHtml
WikiBlock.GetDialog
WikiBlockPlugin.WysiwygInsertMenuCallback
WikiBlockManager.WysiwygInsertMenuCallback
WysiwygDialogHandler
WikiBlock.InitFromDictionary (with empty dictionary)
Set WikiBlockWithContent.Content
WikiBlock.ParseDialogSubmit
WikiBlock.InitFromDictionary
WikiBlock.ValidateData
(success)
return Functions.GenerateWikiBlockClientSideTag
(!success)
throw exception
Note: Should never get here since create dialog won't
close until it's been provided valid data
// if this wiki block's context menu item is clicked
WikiBlockPlugin.WysiwygContextMenuDialogDisplay
WikiBlockManager.WysiwygContextMenuDialogDisplay
WysiwygDialogHandler
Functions.GetWikiBlockInfoFromClientSideRegexMatch
WikiBlock.InitFromDictionary (with wiki block's tag data)
Set WikiBlockWithContent.Content
(fDialogSubmit)
WikiBlock.ParseDialogSubmit
WikiBlock.InitFromDictionary
WikiBlock.ValidateData
(success)
return null (no more dialog to display)
(!success)
return WikiBlock.DialogHtml
WikiBlock.GetDialog
(!fDialogSubmit)
WikiBlock.ValidateData
return WikiBlock.DialogHtml
WikiBlock.GetDialog
WikiBlockPlugin.WysiwygContextMenuCallback
WikiBlockManager.WysiwygContextMenuCallback
WysiwygDialogHandler
Functions.GetWikiBlockInfoFromClientSideRegexMatch
WikiBlock.InitFromDictionary (with wiki block's tag data)
Set WikiBlockWithContent.Content
WikiBlock.ParseDialogSubmit
WikiBlock.InitFromDictionary
WikiBlock.ValidateData
(success)
return Functions.GenerateWikiBlockClientSideTag
(!success)
throw exception
Note: Should never get here since edit dialog won't
close until it's been provided valid data
// if this wiki page has been modified and is saved
WikiBlockPlugin.WikiPageCommitBefore
WikiBlockManager.WikiPageCommitBefore
ProcessWikiBlockTags(RenderingMode.Commit)
GetWikiBlockInfoFromClientSideRegexMatch
GetWikiBlockInstanceFromWikiBlockInfo
WikiBlock.InitFromDictionary
Set WikiBlockWithContent.Content
RenderWikiBlock(RenderingMode.Commit)
WikiBlock.EditCommit
Functions.GenerateWikiBlockPersistedTag
WikiBlockPlugin.WikiPageCommitAfter
WikiBlockManager.WikiPageCommitAfter
WikiBlockPlugin.WikiPageCommitRollback
WikiBlockManager.WikiPageCommitRollback
// Wiki Page Display (diff mode)
WikiBlockPlugin.WikiPageDisplayDiff
WikiBlockManager.WikiPageDisplayDiff
ProcessWikiBlockTags(RenderingMode.Diff)
GetWikiBlockInfoFromPersistedRegexMatch
GetWikiBlockInstanceFromWikiBlockInfo
WikiBlock.InitFromDictionary
Set WikiBlockWithContent.Content
RenderWikiBlock(RenderingMode.Diff)
WikiBlock.DiffHtml