This is how I select my paragraph in my Google doc
let document = DocumentApp.getActiveDocument().getBody();
let paragraphs = document.getParagraphs();
let paragraph = paragraphs[5];
Now how do I check if there is a URL linked on the portion of the paragraph from index/position start
to end
?
For example, if the paragraph were
Hello darkness my old friend
then it should return true for the positions 19 to 23 because that portion of text links to stackoverflow.
There is the method paragraph.editAsText().getLinkUrl()
but it doesn't take the indices/positions as parameters.
Please help
question from:
https://stackoverflow.com/questions/65907400/check-if-portion-of-paragraph-is-hyperlinked-in-google-doc 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…