-
1. Re: TaggedText - how to apply while placing in text frame
[Jongware] Mar 23, 2010 1:06 PM (in response to Dr. TYPO)Do you mean, your JS contains a string like
var a = "<ps:hello>Hello world<ps:>";
and you want ID to automatically parse the tags? That's not possible; at least, not the way you think. Parsing Tagged Text only happens on importing ("placing") from a file -- I don't think there is a way to fool ID into thinking it's reading from a file.
You can, of course, simply save the string into a file and place that -- I never tried it, but I s'pose ID will have no problems with that.
An alternative is writing your string into a text frame "as is" and use scripting to find the tags and replace them with the appropriate formatting.
-
2. Re: TaggedText - how to apply while placing in text frame
Dr. TYPO Mar 23, 2010 1:33 PM (in response to [Jongware])Hola Jongware!
Thanx for the quick answer...
I already suspected, that there's no easy way out of this, arghh!
I think, I'll try it with an external lookup table (txt file), something like the following, after I have parsed the content of the story for start and end position:
<tagA></tagA>
app.selection[0].parentStory.characters.itemByRange(start,end).fillColor = "Red";<tagB></tagB>
app.selection[0].parentStory.characters.itemByRange(start,end).fillColor = "Green";...
Unfortunately this will slow down the whole process, switching the TaggedText filter on and off would have been much more effective... the heck with it.
Thank you anyway,TYPO
***

