Skip to main content
Participant
May 18, 2010
Question

Display text from a container

  • May 18, 2010
  • 1 reply
  • 358 views

Hi,

I am using several containers that display one textflow. Is there a way to trace the seperate texts that are being displayed in every container?

Example:

This is the text: "This is a really long text that is divided over several containers."

container1 displays: "This is a really long ".

container2 displays: "text that is divided ".

container3 displays: "over several containers ".

Now let's say I want to trace the text that is displayed by container2, so "text that is divided ".

My first attempt was to get all the TextLines that exist in container2. Unfortunately I couldn't find a way to get the raw text out of these TextLines.

I hope someone can point me in the right direction?

Regards,

Jorenvans

This topic has been closed for replies.

1 reply

Adobe Employee
May 18, 2010

Each ContainerController has an absoluteStart and a textlength property.  Those can be used to extract the text from the textFlow.  findLeaf will return the first leaf element with text in the container - you'll have to substring it - and then nextLeaf can be used until you're at the first leaf outside the container.

Richard