.. this gives me the following error:
Error string: myDoc.stories.everyItem().tables.everyItem().cells.everyItem().clearO verrides()
is not a function
What is wrong with the script?
'clearOverrides' is not a function of Cells.
clearCellStyleOverrides affects on the Cell styles of a table. I want to affect the character overrides of the text within a table cell.
You can use the method "clearOverrides()" on "texts" objects like "characters", "words", "paragraphs" etc. and of course the whole "texts" object of a cell:
By that you will not clear overrides of "texts" in cells of tables that are nested inside tables…
Or tables that are nested into footnotes*…
(*I never noticed that or forgot about it, but it seems that the story editor cannot see into tables nested into footnotes!)
Thank you, this is what I needed!
if I only wanted to run this in the active Story my cursor is on, could I just change part of the line above?
This would really help my workflow, thanks!!
@Amy – to clear overrides of all texts in all cells of all tables of the story where you have selected some text (even a single insertion point), use this code:
//Clear overrides in all cells of all tables of the story of the text selection: app.selection.parentStory.tables.everyItem().cells.everyItem().texts.clearOverrides();
@Laubender - Thanks! This works perfect!