Story
story
Description
Section titled “Description”A contiguous block of text as specified by a text range. A story can contain one or more text frames; if there is more than one, the multiple text frames are linked together to form a single story.
Properties
Section titled “Properties”Story.characters
Section titled “Story.characters”story.characters
Description
Section titled “Description”All the characters in this story.
Characters; read-only.
Story.insertionPoints
Section titled “Story.insertionPoints”story.insertionPoints
Description
Section titled “Description”All the insertion points in this story.
InsertionPoints; read-only.
Story.length
Section titled “Story.length”story.length
Description
Section titled “Description”The number of characters in the story.
Number (long); read-only.
Story.lines
Section titled “Story.lines”story.lines
Description
Section titled “Description”All the lines in this story.
Lines; read-only.
Story.paragraphs
Section titled “Story.paragraphs”story.paragraphs
Description
Section titled “Description”All the paragraphs in this story.
Paragraphs; read-only.
Story.parent
Section titled “Story.parent”story.parent
Description
Section titled “Description”The object’s container.
Object; read-only.
Story.textFrames
Section titled “Story.textFrames”story.textFrames
Description
Section titled “Description”The text frame items in this story.
TextFrameItems; read-only.
Story.textRange
Section titled “Story.textRange”story.textRange
Description
Section titled “Description”The text range of the story.
TextRange; read-only.
Story.textRanges
Section titled “Story.textRanges”story.textRanges
Description
Section titled “Description”All the text ranges in the story.
TextRanges; read-only.
Story.textSelection
Section titled “Story.textSelection”story.textSelection
Description
Section titled “Description”The selected text ranges in the story.
Array of TextRange; read-only.
Story.typename
Section titled “Story.typename”story.typename
Description
Section titled “Description”The class name of the object.
String; read-only.
Story.words
Section titled “Story.words”story.words
Description
Section titled “Description”All the words in the story.
Words; read-only.
Example
Section titled “Example”Threading text frames into stories
Section titled “Threading text frames into stories”// Creates 1 story that flows through 2 text frames and another story that// is displayed in a 3rd text frame// Create a new document and add 2 area TextFramesvar docRef = documents.add();var itemRef1 = docRef.pathItems.rectangle(600, 200, 50, 30);var textRef1 = docRef.textFrames.areaText(itemRef1);textRef1.selected = true;
// create 2nd text frame and link it the firstvar itemRef2 = docRef.pathItems.rectangle(550, 300, 50, 200);var textRef2 = docRef.textFrames.areaText(itemRef2, TextOrientation.HORIZONTAL, textRef1);textRef2.selected = true;
// Add enough text to the 1st TextFrame to// cause it to flow to the 2nd TextFrame.textRef1.contents = "This is two text frames linked together as one story";redraw();
// Create a 3rd text frame and count the storiesvar textRef3 = docRef.textFrames.add();textRef3.contents = "Each unlinked textFrame adds a new story."textRef3.top = 650;textRef3.left = 200;
redraw();