Created
August 23, 2018 02:09
-
-
Save UskeS/deae6892ee0953012d6d9c05003aa528 to your computer and use it in GitHub Desktop.
[Google Document] [GAS] 先頭行インデントがある行に全角スペースを追加する
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function insertInitSpace() { | |
var doc = DocumentApp.getActiveDocument(); | |
var paras = doc.getBody().getParagraphs(); | |
paras.forEach(function (cv) { | |
var fl = cv.getIndentFirstLine(); | |
if (fl > 0) { | |
cv.setIndentFirstLine(0); | |
cv.setText(" "+cv.getText()); | |
} | |
}); | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment