[英]Highlight word in google docs
有沒有一種方法可以突出顯示使用google doc查看的docx文件中的特定單詞
示例:我有以下文檔,並且正在使用google docs查看它,我需要在文檔中用另一種顏色突出顯示“ Step”一詞
除了打開文檔,對其進行編輯,保存然后將其返回給Google文檔查看器之外,是否有其他可用的使用方法?
您可以使用Google Apps腳本創建,訪問和修改Google Docs文件。
var body = DocumentApp.getActiveDocument().getBody();
// Use editAsText to obtain a single text element containing
// all the characters in the document.
var text = body.editAsText();
// Insert text at the beginning of the document.
text.insertText(0, 'Inserted text.\n');
// Insert text at the end of the document.
text.appendText('\nAppended text.');
// Make the first half of the document blue.
text.setForegroundColor(0, text.getText().length / 2, '#00FFFF');
要突出顯示一個特定的單詞,可以使用findText() 。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.