Skip to main content
Participating Frequently
January 29, 2019
Resuelto

difference between paragraph and text object

  • January 29, 2019
  • 1 respuesta
  • 592 visualizaciones

Hello everyone ... a question certainly trivial, but I'm struggling to find an answer:

what is the difference between the paragraph object and the text object by accessing it via javascript? ...

I see that the first one is still based on the text class, but to use them correctly I should be aware of the differences between the two ...

thanks to anyone who can enlighten me!

Este tema ha sido cerrado para respuestas.
Mejor respuesta de Peter Kahrel

A Paragraph object is a particular kind of Text object. If you select exactly a paragraph (e.g. by double-clicking somewhere in a text), then app.selection[0] returns [object Paragraph]. Same for Word, Character, etc. But when you select some random text, app.selection[0] returns [object Text].

P.

1 respuesta

Peter Kahrel
Community Expert
Peter KahrelCommunity ExpertRespuesta
Community Expert
January 29, 2019

A Paragraph object is a particular kind of Text object. If you select exactly a paragraph (e.g. by double-clicking somewhere in a text), then app.selection[0] returns [object Paragraph]. Same for Word, Character, etc. But when you select some random text, app.selection[0] returns [object Text].

P.

Participating Frequently
January 29, 2019

Thanks for the reply :-)

Community Expert
January 29, 2019

Hi Mirco,

also note that the entity [object Word] can be very confusing.

More on this by Marc Autret here:

What Exactly is a Word?

http://www.indiscripts.com/post/2011/09/what-exactly-is-a-word

Regards,
Uwe