10 Replies Latest reply on Nov 24, 2016 12:59 AM by rollwhistler

    Understanding how to create Javascript Extensions

    rollwhistler

      Hi there,

       

      I'm just starting with Indesign Html5 Extensions, I built an Angular2 app width several screens and buttons and well, everything displays and navigates perfercly.

       

      Now I want it to actually do something, so as I understood, the way to ask Indesign to create a doc is easy, and I also make it work, just call evalScript with the appropiate app.document.add() or something like that, and worked for me, great.

       

      But what If I want to get the first item of a page, get is boundaries and do some calculations? does all of that code need to be inside an evalScript? what If I want to get something from Indesign and then work with it in my apps scope? Do you know what I mean?

       

      With previous actionScript extensions solution, you had a library, you could ask for the page and you got an object and work with it, all in the same scope. But here it seems like the approach is completely diferent and I don't quite get it... can you orientate me a bit?

       

      Thank you!