Write the styleExportTagMap to a text file
I am attempting to write the paragraph style name and its class as defined in the styleExportTagMap of all paragraphs in a document. Here is my javascript so far:
var path = '~/00_temp/';
var filename = 'styleMap.txt';
//Create File object
var file = new File(path + filename);
file.encoding = 'UTF-8';
file.open('w');
//gather data and write it to file
var ps = app.documents[0].allParagraphStyles
while(a = ps.pop())
file.write(a.name+'\t'+a.styleExportTagMaps.toSource()+'\n');
file.close();
Here is the line for the paragraph style TEXT_First_ParaDropCap
TEXT_First_ParaDropCap resolve("/document[@id=4]//paragraph-style[@id=291]/style-export-tag-map")
What I desire is Something like this:
TEXT_First_ParaDropCap class: body_dropCap
I will be up front. I am not sure how to manage toSource().
