I have the following custom action declaration:
<?xml version="1.0" encoding="utf-8"?>
<Elements xmlns="http://schemas.microsoft.com/sharepoint/">
<CustomAction Id="17f8cf1d-c8bf-4721-986b-d4106d77343c.RibbonCustomAction2"
Location="CommandUI.Ribbon"
Sequence="10001"
HostWebDialog="true"
HostWebDialogHeight="300"
HostWebDialogWidth="300"
Title="Dialog Title">
<CommandUIExtension>
<CommandUIDefinitions>
<CommandUIDefinition Location="Ribbon.EditingTools.CPInsert.Content.Controls._children">
<Button Id="Ribbon.WikiPageTab.PageActions.RibbonCustomAction2Button"
Alt="Invoke RibbonCustomAction2"
Sequence="100"
Command="Invoke_RibbonCustomAction2ButtonRequest"
LabelText="CustomAction2"
TemplateAlias="o1"
Image32by32="_layouts/15/images/placeholder32x32.png"
Image16by16="_layouts/15/images/placeholder16x16.png" />
</CommandUIDefinition>
</CommandUIDefinitions>
<CommandUIHandlers>
<CommandUIHandler Command="Invoke_RibbonCustomAction2ButtonRequest"
CommandAction="~appWebUrl/Pages/Image.aspx?listId={ListId}&selectedListId={SelectedListId}&itemId={ItemId}&selectedItemId={SelectedItemId}"/>
</CommandUIHandlers>
</CommandUIExtension >
</CustomAction>
</Elements>
Custom action works and is displayed in Insert tab for Publising Pages, but I can't get the current Page Library and Page Ids. Parameters passed to Image.aspx:
?listId={ListId}&selectedListId=null&itemId={ItemId}&selectedItemId=null&IsDlg=1