Я хочу изменить документ, чтобы всегда применять предложенный текст, когда он кажется ложным, как в следующем примере.
![introducir la descripción de la imagen aquí](https://i.stack.imgur.com/WGdb0.png)
ДляВ тот момент я сделал следующее:
function myFunction() {
var doc = DocumentApp.getActiveDocument();
var body = doc.getBody();
var text = body.getText();
for(var i = 0; i < words.length; i++){
var words = text[i].editAsText();
// here I have to replace the words if it is false et if there is a suggestion
}
}
doc.saveAndClose();
}