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

Character/Paragraph Style Hilight colors

$
0
0

In May 2010 Marc Autret posted this interesting blog: Show Local Formatting in InDesign CS4/CS5, where he shows how an undocumented feature of InDesign can be put to good use. If you set TextPreference.enableStylePreviewMode to true, ID suddenly shows red lines marking local character and paragraph style overrides.  A very neat find, one that I use all the time to check my documents for (uh) "neatness".

 

I just ran across this obscure scripting preference whilst looking for something entirely unrelated -- but something in the description caught my eye.

 

enableStylePreviewModeboolr/wIf true, highlights character and paragraph styles with colored backgrounds.

 

Regular lurkers might remember the puzzling "previewColor" properties in Paragraph and Character Style. Now that's what this is for!

 

This script will add background colors to a paragraph style and a character style, and then show them in your document. No need to worry about your document, despite the name they only appear in Normal view. In Preview mode they disappear, and they will not print or export to PDF.

 

app.activeDocument.textPreferences.enableStylePreviewMode = true;
app.activeDocument.paragraphStyles.item("Body Text").previewColor = UIColors.YELLOW;
app.activeDocument.characterStyles.item("Italics").previewColor = UIColors.CYAN;

 

Upside or downside is this comes with those override red line markings for free. Oh well. Perhaps it's a preference in CS6 -- and I wouldn't mind if the preview color could be set in the style options either, for now it needs a script.

 

Screen Shot 2012-02-05 at 5.35.21 AM.png


Viewing all articles
Browse latest Browse all 15932

Trending Articles



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