I am adding a flyout menu to my CEP extension that is targetted to InDesign. The menu is added fine, i add the eventhandler to com.adobe.csxs.events.flyoutMenuClicked even as well. However, inside the event handler the data object that is supposed to contain the menuID and menuName has a strange string which seems like a JSON but is an invalid JSON. My code is as following
const flyoutMenu = `
<Menu>
<MenuItem Id="option1" Label="Autolayout" Enabled="true" Checked="false"/>
</Menu>
`;
csi.setPanelFlyoutMenu(flyoutMenu);
csi.addEventListener("com.adobe.csxs.events.flyoutMenuClicked", function(event) {
const clickedMenuId = event.data.menuId;
switch (clickedMenuId) {
case "option1":
alert("Autolayout selected");
break;
}
});
When I check event.data in the console I get the following
"${"menuName"=2"Autolayout","menuId"=2"option1"}"
Notice the $, =2 I am not sure wh
... View more