Quantcast
Channel: Adobe Community : Popular Discussions - InDesign Scripting
Viewing all articles
Browse latest Browse all 15932

Get text selection and properties

$
0
0

Hi All,

 

I need to get the text selection in my active document so that I can access the properties of selected text like paragraphs, font styles, colors etc.

I wrote the following script to get text selection,

 

var objDoc = app.activeDocument;

var objText = app.selection[0];

 

This gives me objText as a Text object. When I try to access paragraphs in this text, I get the full contents of the para, not just the ones in the selection. I do not want this. I want to access properties in just the text selection.

 

How can I achieve this?


Viewing all articles
Browse latest Browse all 15932

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>