하이퍼텍스트 링크입니다.
메서드
| 메서드 | 반환 유형 | 간략한 설명 |
|---|---|---|
get | Link | Link을 반환합니다. |
get | Slide|null | URL이 아닌 링크 유형의 연결된 Slide를 반환합니다(있는 경우). |
get | String|null | 연결된 Slide의 ID를 반환하거나 null을 반환합니다. Link이(가)
Link이(가) 아닌 경우 |
get | Integer|null | 연결된 Slide의 0부터 시작하는 색인을 반환하거나 null이(가) Link이(가) 아닌 경우 Link을(를) 반환합니다. |
get | Slide | 연결된 Slide의 Slide을 반환하거나 Link이 Link이 아닌 경우 null을 반환합니다. |
get | String|null | 외부 웹페이지의 URL을 반환하거나 null if the Link is not Link. |
자세한 문서
getLinkType()
LinkType을 반환합니다.
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()}`); }
리턴
승인
이 메서드를 사용하는 스크립트는 다음 범위 중 하나 이상으로 승인이 필요합니다.
-
https://www.googleapis.com/auth/presentations.currentonly -
https://www.googleapis.com/auth/presentations
getLinkedSlide()
URL이 아닌 링크 유형의 연결된 Slide를 반환합니다(있는 경우). 프레젠테이션에 슬라이드가 없거나 LinkType이 LinkType.URL인 경우 null을 반환합니다.
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()}`); }
리턴
Slide|null
승인
이 메서드를 사용하는 스크립트는 다음 범위 중 하나 이상으로 승인이 필요합니다.
-
https://www.googleapis.com/auth/presentations.currentonly -
https://www.googleapis.com/auth/presentations
getSlideId()
연결된 Slide의 ID를 반환하거나 null을 반환합니다. LinkType이(가)
LinkType.SLIDE_ID이(가) 아닌 경우
반환된 ID가 있는 슬라이드가 없을 수도 있습니다.
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()}`); }
리턴
String|null
승인
이 메서드를 사용하는 스크립트는 다음 범위 중 하나 이상으로 승인이 필요합니다.
-
https://www.googleapis.com/auth/presentations.currentonly -
https://www.googleapis.com/auth/presentations
getSlideIndex()
연결된 Slide의 0부터 시작하는 색인을 반환하거나 null이(가) LinkType이(가) 아닌 경우 LinkType.SLIDE_INDEX을(를) 반환합니다.
반환된 색인의 슬라이드가 없을 수도 있습니다.
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()}`); }
리턴
Integer|null
승인
이 메서드를 사용하는 스크립트는 다음 범위 중 하나 이상으로 승인이 필요합니다.
-
https://www.googleapis.com/auth/presentations.currentonly -
https://www.googleapis.com/auth/presentations
getSlidePosition()
연결된 Slide의 SlidePosition을 반환하거나 LinkType이 LinkType.SLIDE_POSITION이 아닌 경우 null을 반환합니다.
반환된 상대적 위치의 슬라이드가 없을 수도 있습니다.
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()}`, ); }
리턴
SlidePosition|null
승인
이 메서드를 사용하는 스크립트는 다음 범위 중 하나 이상으로 승인이 필요합니다.
-
https://www.googleapis.com/auth/presentations.currentonly -
https://www.googleapis.com/auth/presentations
getUrl()
외부 웹페이지의 URL을 반환하거나 null if the LinkType is not LinkType.URL.
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()}`); }
리턴
String|null
승인
이 메서드를 사용하는 스크립트는 다음 범위 중 하나 이상으로 승인이 필요합니다.
-
https://www.googleapis.com/auth/presentations.currentonly -
https://www.googleapis.com/auth/presentations