I am trying to build a Webaddin for Excel using OfficeJS.
I couldn't find anything mentioned in the OfficeJS docs for my requirement.
My requirement is to group or distinguish between multiple Sub-Menu Items.
Something like in the image below
1st Image
or
2nd Image
This is how my right-click contextual Menu looks like with multiple Sub-Menu Items
3rd Image
I want to add a few more sub-menus and group Sub-Menu-1 and Sub-Menu-2 as Group 1 and Sub-Menu-3 and Sub-Menu-4 as Group 2.
I want to show the Group 1 and Group 2 as headings just like the 'Paste Options:' in the 1st image or show a a line seperating the 2 groups like in the 2nd image.
This is the code in my manifest file for right click contextual menu
<ExtensionPoint xsi:type="ContextMenu">
<OfficeMenu id="ContextMenuCell">
<Control xsi:type="Menu" id="Menu">
<Label resid="Dropdown.Label" />
<Supertip>
<Title resid="Dropdown.Label" />
<Description resid="Dropdown.Tooltip" />
</Supertip>
<Items>
<Item id="Menu.Item1">
<Label resid="Item1.Label"/>
<Supertip>
<Title resid="Item1.Label" />
<Description resid="Item1.Tooltip" />
</Supertip>
<Action xsi:type="ExecuteFunction">
<FunctionName>signOff</FunctionName>
</Action>
<Enabled>false</Enabled>
</Item>
<Item id="Menu.Item2">
<Label resid="Item2.Label"/>
<Supertip>
<Title resid="Item2.Label" />
<Description resid="Item2.Tooltip" />
</Supertip>
<Action xsi:type="ExecuteFunction">
<FunctionName>signOff2</FunctionName>
</Action>
</Item>
</Items>
</Control>
</OfficeMenu>
</ExtensionPoint>