I am working on a plugin that requires some specially-configured table, cell and paragraph styles to be defined. I’d like to add a button that automatically loads some starter styles into the application.
My plugin dist/
contains a starterStyles.indd
file which contains the styles I’d like to load with app.importStyles()
.
How can I grab this file as a File
object and pass it into importStyles()
?
I’ve tried fs.readFile()
which returns an ArrayBuffer, and fs.getFileForOpening()
will prompt the user, which I don’t want.
Any advice is appreciated!