Using Google App Script, is there a way to get all the TextRuns (a block of text with the same format) in Google Docs?
I'm trying to create a function that batch replaces one specific text format (from black text to white text).
I've looked through the GAS reference, but can't find anything that does this. findElement()
doesn't allow the ElementType TextRun
. And overall TextRun doesn't seem to be a functional/manipulable element, at least in the current ref docs -- even though the Document Structure doc does mention it as a sub-element of Paragraph.
So, is there a way to get all the TextRuns? Or is there an equivalent alternative?