Skip to content
fabiantheblind edited this page Mar 27, 2016 · 1 revision

To add some placeholder text into a text frame you can use textFrame.contents = TextFrameContents.PLACEHOLDER_TEXT.

// build a textFrame and a doc in one line :-)
var tf = (app.documents.add(
    {
      documentPreferences:{
        pageWidth:200,
        pageHeight:200,
        facingPages:false
        }
      }
    )).pages[0].textFrames.add(
    {
      geometricBounds:[20,20,180,180]
      }
    );

tf.contents = TextFrameContents.PLACEHOLDER_TEXT; // <-- This is it

You can add your own Placeholder text to your InDesign by adding a file called placeholder.txt to your InDesign folder.

Clone this wiki locally