Select links in Google Doc -


i'm looking following:

  1. locate links in document
  2. select them , change styling

so far, have:

var body = documentapp.getactivedocument().getbody(); var text = body.editastext().gettext(); var words = text.split(' ');  (var = 0; < words.length; i++) {   var word = words[i];   // doesn't work because word isn't text object   // word.getlinkurl(); } 

i understand how iterate on words in paragraph. issue determining if text link. can't use gettext() method because converts text object string (prohibiting me testing if word link via getlinkurl() method.

i've found number of "find , replace" solutions. can't use findtext() because can't predict strings in links. instance, resources point example.com.

any appreciated.

this post seems you're looking for: get links


Comments

Popular posts from this blog

get url and add instance to a model with prefilled foreign key :django admin -

css - Make div keyboard-scrollable in jQuery Mobile? -

ruby on rails - Seeing duplicate requests handled with Unicorn -