Working with Text
With the relevant knowledge of InDesign’s object model, some idea about properties, and enough knowledge of JavaScript, we should now set about doing something useful with InDesign’s objects and their properties. We’ll begin with some aspects of text processing.
Adding, Replacing, and Removing Text
To add text to, let’s say, a paragraph, place the cursor anywhere in a paragraph in an InDesign document. Remember that each text object has insertion points. If you position the cursor at the very beginning of the paragraph, you in effect select the paragraph’s first insertion point, which in JavaScript ...
Get Scripting InDesign CS3/4 with JavaScript now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.