Closed jieliu218 closed 5 years ago
Hi (from Jerusalem 🖐)! I'm building a CEP panel for InDesign with React. So far everything is working amazing. But I can't find a way to access CSinterface from React. I saw you did manange, but how?
Thanks! תודה רבה!!!
@newgraph hi,
you just have to instantiate it from wherever you like:
var interface = new CSInterface()
this is accessible via the Session
object
you just have to instantiate it from wherever you like:
That doesn't work - React throws a build error 'CSInterface' is not defined
.
I got around this issue by adding the CSInterface
object to the global window
object, so it is accessible from within the React app.
Probably not the most legitimate way... but it works...
a build or runtime error ?
CSInterface.js
is included in the main html file and therefore should be
fine for usage. I do use it inside the session object.
basically, it works for me when used and tested inside the adobe product.
I do recommend using the version I published as it also gives you
infrastructure for evaluating host jsx files for adobe products.
hi @jieliu218 , the file is being loaded on startup. look at the session-src folder as one of the managers use it