Skip to content

TabStopInfo

app.activeDocument.textFrames[index].paragraphs[index].paragraphAttributes.tabStops

Information about the alignment, position, and other details for a tab stop in a ParagraphAttributes object.


app.activeDocument.textFrames[index].paragraphs[index].paragraphAttributes.tabStops.alignment

The alignment of the tab stop.

Default: Left

TabStopAlignment


app.activeDocument.textFrames[index].paragraphs[index].paragraphAttributes.tabStops.decimalCharacter

The character used for decimal tab stops.

Default: .

String


app.activeDocument.textFrames[index].paragraphs[index].paragraphAttributes.tabStops.leader

The leader dot character.

String


app.activeDocument.textFrames[index].paragraphs[index].paragraphAttributes.tabStops.position

The position of the tab stop expressed in points.

Default: 0.0

Number (double)


app.activeDocument.textFrames[index].paragraphs[index].paragraphAttributes.tabStops.typename

The class name of the object.

String; read-only.


// Displays tab stop information found in each text frame
// of current document, if any.
var docRef = app.activeDocument;
var sData = "Tab Stops Found \\rTabStop Leader\t\tTabStop Position\r";
var textRef = docRef.textFrames;
for( var i=0 ; i < textRef.length; i++ ) {
// Get all paragraphs in the textFrames
var paraRef = textRef[i].paragraphs;
for ( p=0 ; p < paraRef.length ; p++ ) {
// Get para attributes for all textRanges in paragraph
var attrRef = paraRef[p].paragraphAttributes;
var tabRef = attrRef.tabStops;
if ( tabRef.length > 0 ) {
for(var t=0; t<tabRef.length; t++){
sData += "\t" + tabRef[t].leader + "\t\t";
sData += "\t\t" + tabRef[t].position + "\r";
} // end for
} // end if
} // end for
} // end for
var newTF = docRef.textFrames.add();
newTF.contents = sData;
newTF.top = 400;
newTF.left = 100; redraw();