Link hiperteks.
Metode
| Metode | Jenis hasil yang ditampilkan | Deskripsi singkat | 
|---|---|---|
| get | Link | Menampilkan Link. | 
| get | Slide | Menampilkan Slidetertaut untuk jenis link non-URL, jika ada. | 
| get | String | Menampilkan ID Slideataunulltertaut jikaLinkbukanLink. | 
| get | Integer | Menampilkan indeks berbasis nol dari Slideataunulltertaut jikaLinkbukanLink. | 
| get | Slide | Menampilkan SlidedariSlideataunulltertaut jikaLinkbukanLink. | 
| get | String | Menampilkan URL ke halaman web eksternal atau nulljikaLinkbukanLink. | 
Dokumentasi mendetail
get
Menampilkan Link.
const shape = SlidesApp.getActivePresentation().getSlides()[0].getShapes()[0]; const link = shape.getLink(); if (link != null) { Logger.log(`Shape has a link of type: ${link.getLinkType()}`); }
Pulang pergi
Otorisasi
Skrip yang menggunakan metode ini memerlukan otorisasi dengan satu atau beberapa cakupan berikut:
- 
https://www.googleapis.com/auth/presentations.currentonly
- 
https://www.googleapis.com/auth/presentations
get
Menampilkan Slide tertaut untuk jenis link non-URL, jika ada. Menampilkan null jika
slide tidak ada dalam presentasi, atau jika Link adalah Link.
const shape = SlidesApp.getActivePresentation().getSlides()[0].getShapes()[0]; const link = shape.getLink(); if (link != null && link.getLinkType() !== SlidesApp.LinkType.URL) { Logger.log(`Shape has link to slide: ${link.getLinkedSlide()}`); }
Pulang pergi
Otorisasi
Skrip yang menggunakan metode ini memerlukan otorisasi dengan satu atau beberapa cakupan berikut:
- 
https://www.googleapis.com/auth/presentations.currentonly
- 
https://www.googleapis.com/auth/presentations
get
Menampilkan ID Slide atau null tertaut jika Link bukan
Link.
Perhatikan bahwa slide dengan ID yang ditampilkan mungkin tidak ada.
const shape = SlidesApp.getActivePresentation().getSlides()[0].getShapes()[0]; const link = shape.getLink(); if (link != null && link.getLinkType() === SlidesApp.LinkType.SLIDE_ID) { Logger.log(`Shape has link to slide with ID: ${link.getSlideId()}`); }
Pulang pergi
String
Otorisasi
Skrip yang menggunakan metode ini memerlukan otorisasi dengan satu atau beberapa cakupan berikut:
- 
https://www.googleapis.com/auth/presentations.currentonly
- 
https://www.googleapis.com/auth/presentations
get
Menampilkan indeks berbasis nol dari Slide atau null tertaut jika Link bukan Link.
Perhatikan bahwa slide di indeks yang ditampilkan mungkin tidak ada.
const shape = SlidesApp.getActivePresentation().getSlides()[0].getShapes()[0]; const link = shape.getLink(); if (link != null && link.getLinkType() === SlidesApp.LinkType.SLIDE_INDEX) { Logger.log(`Shape has link to slide with index: ${link.getSlideIndex()}`); }
Pulang pergi
Integer
Otorisasi
Skrip yang menggunakan metode ini memerlukan otorisasi dengan satu atau beberapa cakupan berikut:
- 
https://www.googleapis.com/auth/presentations.currentonly
- 
https://www.googleapis.com/auth/presentations
get
Menampilkan Slide dari Slide atau null tertaut jika Link bukan Link.
Perhatikan bahwa slide dengan posisi relatif yang ditampilkan mungkin tidak ada.
const shape = SlidesApp.getActivePresentation().getSlides()[0].getShapes()[0]; const link = shape.getLink(); if (link != null && link.getLinkType() === SlidesApp.LinkType.SLIDE_POSITION) { Logger.log( `Shape has link to slide with relative position: ${ link.getSlidePosition()}`, ); }
Pulang pergi
Otorisasi
Skrip yang menggunakan metode ini memerlukan otorisasi dengan satu atau beberapa cakupan berikut:
- 
https://www.googleapis.com/auth/presentations.currentonly
- 
https://www.googleapis.com/auth/presentations
get
Menampilkan URL ke halaman web eksternal atau null jika Link bukan Link.
const shape = SlidesApp.getActivePresentation().getSlides()[0].getShapes()[0]; const link = shape.getLink(); if (link != null && link.getLinkType() === SlidesApp.LinkType.URL) { Logger.log(`Shape has link to URL: ${link.getUrl()}`); }
Pulang pergi
String
Otorisasi
Skrip yang menggunakan metode ini memerlukan otorisasi dengan satu atau beberapa cakupan berikut:
- 
https://www.googleapis.com/auth/presentations.currentonly
- 
https://www.googleapis.com/auth/presentations