Reply To: Apply color to all tracked changes in Story Editor

#93875

Alexandro, if you do it in your way, you highlight only additional and not removed text? If this is enough for you, conditions could also work:

(function() { 
  var curDoc = app.activeDocument;

  if (!curDoc.conditions.itemByName("Highlight").isValid) {  
    var colorToHighlight = curDoc.conditions.add(
      {name:"Highlight",indicatorMethod:ConditionIndicatorMethod.USE_HIGHLIGHT, indicatorColor:UIColors.YELLOW}
    );
  } 
  else {
    var colorToHighlight = curDoc.conditions.itemByName("Highlight");
  }

  curDoc.conditionalTextPreferences.showConditionIndicators = ConditionIndicatorMode.SHOW_AND_PRINT_INDICATORS;
  curDoc.stories.everyItem().changes.everyItem().characters.everyItem().appliedConditions = [colorToHighlight];
} () );

Edit: It seems also possible to loop through all changes and different changes have a different type, e.g. changeType = DELETED_TEXT. So a more or less complex script could set a flag, draw a frame or whatever at this location or could even display the deleted text …

Kai

This article was last modified on April 25, 2017

Comments (0)

Loading comments...