Adobe-CEP / Samples

Code samples for CEP extensions
MIT License
984 stars 552 forks source link

Improve script-calling and add sample using new func #66

Closed embiem closed 7 years ago

embiem commented 7 years ago

I wanted to share with you my approach to call JSX functions as an alternative to the "evalScript" function.

My "callScript" function enables:

This PR consists of:

  1. The callScript function in CSInterface
  2. The callScript jsx-function as entry-point in PProPanel.jsx
  3. An example how to use this, using a new "Create Deep Folder-Structure" button.

With ES6 and promises, this would look even nicer. But to fit into this PProPanel example, I kept the general vanilla js style.