Indesign Server Scripting Textarea.Contents

I am creating a Javascript script for use with Indesign Server (CS3).

Trying to find all text fields inside a document and find their contents.

I can easily iterate over all text areas using functions provided by Adobe.

However, when I try to get the contents of TextArea, I only get the content that is displayed inside this text box, not the port text.

document.TextAreas[0].contents

In other words, if the Indesign document contains a text box with a little plus sign, which indicates that the text is larger, but it does not fit, then my script does not return hidden text.

Or, I repeat again. Can I get all the content if the "overflows" property for "textarea" is false,

Full code:

function FindAllTextBoxes(){
        var alertMessage;
        for (var myCounter = myDoc.textFrames.length-1; myCounter >= 0; myCounter--) {
        var myTextFrame = myDoc.textFrames[myCounter];
            alertMessage += "\nTextbox  content: " + myTextFrame.contents;
            alertMessage += "\nOverflow:" + myTextFrame.overflows;
            alert(alertMessage);
        }
}

How can I read the full content of Textarea?

+5
1

, . InDesign CS5 - TextFrame:

var content = myTextFrame.parentStory.contents;

, !

+3

All Articles