Current active document and JSX extension
Hello,
I’m tinkering with a JSX extension following the CEP 7 documentation, and so far it’s working ok. Now, suppose I have multiple documents open in InDesign and open the extension’s panel. Three questions in this context:
- How do I find the active document in InDesign, the one the user is currently working on? It seems that app.activeDocument, if it exists, is the correct reference?
- When the user switches from one to another document, I need to update my extension’s panel. Is there a call-back that I could register?
- Is it possible to store “private” or extension-specific data with the document, so that my extension can update state depending on the active document? Or is that data better stored in local storage using some document-specific identifier?
Thanks!
