하이퍼텍스트 링크입니다.
방법
메서드 | 반환 유형 | 간략한 설명 |
---|---|---|
getLinkType() | LinkType | LinkType 를 반환합니다. |
getLinkedSlide() | Slide | URL이 아닌 링크 유형에 연결된 Slide 가 있는 경우 이를 반환합니다. |
getSlideId() | String | 연결된 Slide 의 ID를 반환하거나 LinkType 가 LinkType.SLIDE_ID 가 아닌 경우 null 를 반환합니다. |
getSlideIndex() | Integer | LinkType 이 LinkType.SLIDE_INDEX 가 아닌 경우 연결된 Slide 의 0부터 시작하는 색인을 반환하거나 null 을 반환합니다. |
getSlidePosition() | SlidePosition | 연결된 Slide 의 SlidePosition 를 반환하거나 LinkType 가 LinkType.SLIDE_POSITION 가 아닌 경우 null 를 반환합니다. |
getUrl() | String | 외부 웹페이지의 URL을 반환하거나 LinkType 가 LinkType.URL 가 아닌 경우 null 을 반환합니다. |
자세한 문서
getLinkType()
getLinkedSlide()
URL이 아닌 링크 유형에 연결된 Slide
가 있는 경우 이를 반환합니다. 프레젠테이션에 슬라이드가 없거나 LinkType
이 LinkType.URL
이면 null
를 반환합니다.
var link = shape.getLink(); if (link != null && link.getLinkType() != SlidesApp.LinkType.URL) { Logger.log('Shape has link to slide: ' + link.getLinkedSlide()); }
리턴
승인
이 방법을 사용하는 스크립트는 다음 범위 중 하나 이상을 승인해야 합니다.
-
https://www.googleapis.com/auth/presentations.currentonly
-
https://www.googleapis.com/auth/presentations
getSlideId()
연결된 Slide
의 ID를 반환하거나 LinkType
가 LinkType.SLIDE_ID
가 아닌 경우 null
를 반환합니다.
반환된 ID를 가진 슬라이드가 존재하지 않을 수 있습니다.
var link = shape.getLink(); if (link != null && link.getLinkType() == SlidesApp.LinkType.SLIDE_ID) { Logger.log('Shape has link to slide with ID: ' + link.getSlideId()); }
리턴
String
승인
이 방법을 사용하는 스크립트는 다음 범위 중 하나 이상을 승인해야 합니다.
-
https://www.googleapis.com/auth/presentations.currentonly
-
https://www.googleapis.com/auth/presentations
getSlideIndex()
LinkType
이 LinkType.SLIDE_INDEX
가 아닌 경우 연결된 Slide
의 0부터 시작하는 색인을 반환하거나 null
을 반환합니다.
반환된 색인에 있는 슬라이드가 존재하지 않을 수 있습니다.
var link = shape.getLink(); if (link != null && link.getLinkType() == SlidesApp.LinkType.SLIDE_INDEX) { Logger.log('Shape has link to slide with index: ' + link.getSlideIndex()); }
리턴
Integer
승인
이 방법을 사용하는 스크립트는 다음 범위 중 하나 이상을 승인해야 합니다.
-
https://www.googleapis.com/auth/presentations.currentonly
-
https://www.googleapis.com/auth/presentations
getSlidePosition()
연결된 Slide
의 SlidePosition
를 반환하거나 LinkType
가 LinkType.SLIDE_POSITION
가 아닌 경우 null
를 반환합니다.
상대 위치가 반환된 슬라이드는 존재하지 않을 수 있습니다.
var link = shape.getLink(); if (link != null && link.getLinkType() == SlidesApp.LinkType.SLIDE_POSITION) { Logger.log('Shape has link to slide with relative position: ' + link.getSlidePosition()); }
리턴
승인
이 방법을 사용하는 스크립트는 다음 범위 중 하나 이상을 승인해야 합니다.
-
https://www.googleapis.com/auth/presentations.currentonly
-
https://www.googleapis.com/auth/presentations
getUrl()
외부 웹페이지의 URL을 반환하거나 LinkType
가 LinkType.URL
가 아닌 경우 null
을 반환합니다.
var link = shape.getLink(); if (link != null && link.getLinkType() == SlidesApp.LinkType.URL) { Logger.log('Shape has link to URL: ' + link.getUrl()); }
리턴
String
승인
이 방법을 사용하는 스크립트는 다음 범위 중 하나 이상을 승인해야 합니다.
-
https://www.googleapis.com/auth/presentations.currentonly
-
https://www.googleapis.com/auth/presentations