Copy link to clipboard
Copied
I want the selected text to be displayed to me when I select a word or text in InDesign by executing the style paragraph script and its style character?
Try the following
alert(app.selection[0].appliedParagraphStyle.name)
alert(app.selection[0].appliedCharacterStyle.name)
-Manan
Copy link to clipboard
Copied
Try the following
alert(app.selection[0].appliedParagraphStyle.name)
alert(app.selection[0].appliedCharacterStyle.name)
-Manan
Copy link to clipboard
Copied
Hi tabalvor_andisheh,
it's getting more complicate depending what exactly is selected.
There could be more than one character style applied to selected text. You could loop the array of textStyleRanges.
If you selected text that belongs to two or more paragraphs you need to test for all paragraphs in your selection to get a possible range of applied paragraph styles.
Regards,
Uwe Laubender
( ACP )