Skip to main content
Inspiring
March 12, 2018
Answered

Add a flyout menu in illustrator cep extensionAdd-one development

  • March 12, 2018
  • 1 reply
  • 2258 views

Hi,

How to add a flyout menu in illustrator cep(2014) html panel

i have use following code

var flyoutXML = '<Menu> \

<MenuItem Id="actionMenuItem" Label="testMenu" Enabled="true" Checked="false"/> \

</Menu>';

// Uses the XML string to build the menu

csInterface.setPanelFlyoutMenu(flyoutXML);

window.__adobe_cep__.invokeSync("setPanelFlyoutMenu", menu);

but it does not worked in illustrator. but worked fine in indesign

pls help

Thanks

[Moved to Extension/Add one development by Moderator]

This topic has been closed for replies.
Correct answer Ten A

yes i have tried. but it did not worked in illustrator 2014.

i have test with illustrator 2018 its worked fine.

but i need a flyout menu in illustrator 2014.

i think flyout menu will show above 2014 illustrator versions.


Flyout menu supported since version 18.1 released oct 2014 and not support version 18.0.

(18.1 supports CSInterface version.5.2, 18.0 supports CSInterface version5.0.)

Why don't you add HTML based Flyout menu like below?

1 reply

Ten A
Community Expert
Community Expert
March 13, 2018

Here is a typical component of flyout menu.

var csInterface = new CSInterface();

var menuXML  = '<Menu><MenuItem Id="menuItemId1" Label="TEST Stiing" Enabled="true" Checked="false"/></Menu>';

csInterface.setPanelFlyoutMenu(menuXML);

csInterface.addEventListener("com.adobe.csxs.events.flyoutMenuClicked", setPanelCallback);

function setPanelCallback(event) {

if (event.data.menuId=="menuItemId1") {

//

}

}

Generate XML and set it into setPanelCallback method. We can listen to flyoutMenuClicked event like previous.

And no need to add invokeSync method, It already contains setPanelFlyoutMenu.

Inspiring
March 13, 2018

Hi Ten,

once again thanks for your reply.

sorry it does not worked in illustrator 2014.

and i have not added just mentioned this code window.__adobe_cep__.invokeSync("setPanelFlyoutMenu", menu);

Thanks.

Ten A
Community Expert
Community Expert
March 13, 2018

Have you already try CEP_HTML_Test_Extension made by Adobe official?

Samples/CEP_HTML_Test_Extension at master · Adobe-CEP/Samples · GitHub

We can test and reference flyout menu in this extension.