Copy link to clipboard
Copied
I want to split some texts by paragraphstyle,how to select a section text in middle of paragraphstyle A and paragraphstyle B?
Please suggest me how to do this with javascript.
Thanks,
Goldbridge
How about
Pseudo Code
... findPreferences ... = style1
myStyle1Finds = myStory.findText()
... findPreferences ... = style2
myStyle2Finds = myStory.findText()
loop .. i
a = myStyle1Finds.characters[-1].index + 1;
b = myStyle2Finds.characters[0].index - 1;
a bit of checking here to see that b is > a
then something close to
a = myStory.characters.paragraphs[0];
b = myStory.characters.paragraphs[0];
// paragraphs in between are
myStory.paragraphs.itemByRange(a,b).fillColor = "None" (well you might want to pick s
...Copy link to clipboard
Copied
Hi! Screenshots please!
(^/)
Copy link to clipboard
Copied
How about
Pseudo Code
... findPreferences ... = style1
myStyle1Finds = myStory.findText()
... findPreferences ... = style2
myStyle2Finds = myStory.findText()
loop .. i
a = myStyle1Finds.characters[-1].index + 1;
b = myStyle2Finds.characters[0].index - 1;
a bit of checking here to see that b is > a
then something close to
a = myStory.characters.paragraphs[0];
b = myStory.characters.paragraphs[0];
// paragraphs in between are
myStory.paragraphs.itemByRange(a,b).fillColor = "None" (well you might want to pick some other properties and values).
HTH
Trevor
Copy link to clipboard
Copied