Copy link to clipboard
Copied
How to find the bold text in indesign document by running script in script panel. Please guide me.........
-Jothi
I did not quite follow what you want, to get all the text of the document you could use the following code. It does not care about the formatting applied to the text
app.activeDocument.stories.everyItem().contents
To get the content of a textframe you need to refer its contents property
-Manan
ok 1'll explain you what i'm trying to do is, I have generated an xml including <bol></bol> tag for some text. After drag and drop the contents from xml in InDesign document the text included in <bol></bol> tag gets bold. But, in our plugin after using liveupdate the bold tag disappears in the database but it present in the xml. i don't know what to do with it. i'm searching to do liveupdate with all tags that applied in the xml must apply to the database. Is there ia a way??? The reason i have
...Copy link to clipboard
Copied
You can use the Find/Change feature to find the font style. The following script would do that
app.findTextPreferences = NothingEnum.nothing;
app.findTextPreferences.fontStyle = "Bold"
var find = app.activeDocument.findText ();
app.findTextPreferences = NothingEnum.nothing;
alert("Found " + find.length + " occurence")
-Manan
Copy link to clipboard
Copied
Yeah! It's shows the bold text count. I have an another doubt (for.eg., In InDesign document i have contents with bold text and unbold text in a same textframe by using the script i need to fetch all texts in the InDesign document without missing the bold text and unbold text is it possible)
-Jothi
Copy link to clipboard
Copied
Hi Manan,
I have an another problem the code that you have given displays the count of bold text. How to display the content of the bold text i have tried but it shows undefined. Please guide me
-Jothi
Copy link to clipboard
Copied
I did not quite follow what you want, to get all the text of the document you could use the following code. It does not care about the formatting applied to the text
app.activeDocument.stories.everyItem().contents
To get the content of a textframe you need to refer its contents property
-Manan
Copy link to clipboard
Copied
ok 1'll explain you what i'm trying to do is, I have generated an xml including <bol></bol> tag for some text. After drag and drop the contents from xml in InDesign document the text included in <bol></bol> tag gets bold. But, in our plugin after using liveupdate the bold tag disappears in the database but it present in the xml. i don't know what to do with it. i'm searching to do liveupdate with all tags that applied in the xml must apply to the database. Is there ia a way??? The reason i have asked about the scripting is to check wheather i can get the document contents with applied styles or not..
-Jothi