Does anyone know of a script that can remove paragraph overrides from text that is selected with the Type tool?
I have many paragraphs that have nested styles. InDesign does not implement the nested style untl I select the paragraph and Alt-click the style in the Paragraph Styles panel to remove the override. After that, the paragraph has the correct formatting.
This is hugely time-consuming because I have to place many such paragraphs in a very long document.
I don't want to remove overrides throughout the whole document, just those paragraphs that are selected. That way, I can place a bunch of text into InDesign, select the text and remove the overrides, before moving it into place on the layout.
If anyone can help, it would be a tremendous relief to me.
Thank you so much for your quick reply. Does this script remove overrides in multiple types of paragraphs?
I need to select a bunch of paragraphs, each paragraph may have a different style applied to it, and remove the overrides from all of them at once.
It only removes paragraph level overrides.
If you need it to remove all overrides, remove the argument: OverrideType.PARAGRAPH_ONLY
Got a chance to try out your script this evening. I'm using InDesign CS5. I saved the script as a plain text file with a .jsx file extention, and put the script into the User folder inside the Scripts folder.
It shows up in the InDesign Scripts panel. I tried using it by selecting a couple of paragraphs with overrides, and then clicking on the script in the Scripts panel. It didn't remove the overrides. These paragraphs have nested styles, so I thought that perhaps I need to remove the "OverrideType.PARAGRAPH_ONLY"
The revised script looks like this:
However, that didn't work either.
What am I doing wrong that the script isn't working for me? I hope that you have a suggestion.
Adding to my message, if I select each paragraph one at a time, and Alt-Shift-click on the style in the Paragraph Styles panel, it removes the overrides. Of course, I'm trying to avoid doing one paragraph at a time.
Experiment with different types of override:
Your app.selection.clearOverrides will never work: it's a method and should always have two parentheses at the end: app.selection.clearOverrides(). Don't know if that'll work, though.
The default of clearOverrides() is OverrideType.ALL
app.selection.clearOverrides(); is the same thing as app.selection.clearOverrides(OverrideType.ALL);
Thank you. More than 6 years after you posted this it let me get rid of the odious "ideoSpaceBehavior" override that no one to my and Google's knowledge ever solved! BTW, in more than 10K paragraphs where the usual alt-click to remove overrides would only do 1 para at a time.
That ideoSpaceBehaviour thing has snuck into some of my style sheets, and I have no idea how to get rid of it. How did this help?
Another thought. If this script removes overrides from only one paragraph style at a time, could it be revised to list all of the paragraph styles that need overrides removed?
Thank you Harbs and Peter, for your suggestions.
I tried the following scripts, none of which have worked:
Unfortunately, InDesign is still clinging tightly to the overrides. If it would help for me to upload a few paragraphs for you to look at, let me know.
> If it would help for me to upload a few paragraphs for you to look at, let me know.
By all means do.
I know this is a very old discussion.
But can you remember if Jay Fresno provided a sample text where clearOverrides() did not work entirely?
And perhaps alt + click or alt + shift +click the paragraph style did work?
I don't think he did. Those key strokes you mentioned are keyboard equivalents of the clearOverrides() parameters.