본문으로 건너뛰기

Show.Comment

Show.Comment은 Presentation 모듈(Office.show(iframe))의 객체 타입입니다. 메서드 14개.

Generated from the SDK type definitions

Presentation · 객체 타입 10개 · 메서드 586개 · 네임스페이스 Show. 이 레퍼런스는 SDK 빌드와 함께 생성된 API 문서 아티팩트(sdk-api-doc.html)에서 생성됩니다. 설명은 게시된 편집기 API 주석 그대로입니다. SDK와 Office 버전을 함께 고정하고, 둘 중 하나가 바뀌면 다시 생성하십시오.

비고

메서드

메서드설명
appendText(text)댓글 텍스트 끝에 이어 붙인다.
getAuthorName()댓글 작성자 이름을 반환한다.
getDateTime()댓글 작성 일시를 반환한다.
getParent()해당 댓글의 부모 댓글을 반환한다.
getPosition()댓글 메모 아이콘의 슬라이드 기준 위치를 반환합니다.
getReplies()이 댓글의 답글 목록을 반환한다.
getStyle()댓글 메모 스타일을 반환한다.
getText()댓글 텍스트를 반환한다.
hasReplies()답글이 하나라도 있는지 여부를 반환한다.
isReply()이 댓글이 답글인지 여부를 반환한다.
moveBy(distance)댓글 메모를 x, y 만큼 상대 이동시킵니다.
setPosition(position)댓글 메모를 슬라이드 기준 절대 위치로 이동시킵니다.
setStyle(style)댓글 메모 스타일을 변경한다.
setText(text)댓글 텍스트를 설정한다.

메서드 상세

appendText(text)

댓글 텍스트 끝에 이어 붙인다.

appendText(text: string): Promise<void>;

매개변수

이름타입설명
textstring추가할 텍스트

반환값

Promise<void>

getAuthorName()

댓글 작성자 이름을 반환한다.

getAuthorName(): Promise<string | null>;

반환값

Promise<string | null> - 작성자 이름 (작성자 정보가 없으면 빈 문자열). 대상 댓글이 없으면 null

getDateTime()

댓글 작성 일시를 반환한다.

getDateTime(): Promise<string | null>;

반환값

Promise<string | null> - 작성 일시 'YYYY-MM-DDTHH:mm:ss.SSS'. 대상 댓글이 없으면 null

getParent()

해당 댓글의 부모 댓글을 반환한다.

getParent(): Promise<Comment>;

반환값

Promise<Comment> - 부모 댓글. 답글이 아니거나 대상 댓글이 없으면 null

getPosition()

댓글 메모 아이콘의 슬라이드 기준 위치를 반환합니다.

getPosition(): Promise<CommentPosition | null>;

반환값

Promise<CommentPosition | null> - 댓글 메모 아이콘의 위치 (px 단위). 대상 댓글이 없으면 null

getReplies()

이 댓글의 답글 목록을 반환한다.

getReplies(): Promise<Comment[]>;

반환값

Promise<Comment[]> - 답글 목록. 대상 댓글이 없으면 빈 배열

getStyle()

댓글 메모 스타일을 반환한다. (setStyle 대칭) 스타일을 지정한 적 없는 댓글도 작성자별 기본 스타일로 반환된다.

getStyle(): Promise<CommentStyle | null>;

반환값

Promise<CommentStyle | null> - 메모 스타일. 대상 댓글이 없거나 프리셋 밖 스타일이면 null

getText()

댓글 텍스트를 반환한다.

getText(): Promise<string | null>;

반환값

Promise<string | null> - 댓글 텍스트. 대상 댓글이 없으면 null

hasReplies()

답글이 하나라도 있는지 여부를 반환한다.

hasReplies(): Promise<boolean | null>;

반환값

Promise<boolean | null> - 답글이 있으면 true. 대상 댓글이 없으면 null

isReply()

이 댓글이 답글인지 여부를 반환한다.

isReply(): Promise<boolean | null>;

반환값

Promise<boolean | null> - 답글이면 true. 대상 댓글이 없으면 null

moveBy(distance)

댓글 메모를 x, y 만큼 상대 이동시킵니다.

moveBy(distance: Record<string, unknown>): Promise<void>;

매개변수

이름타입설명
distanceRecord<string, unknown>{ x, y } (px 단위 이동량). 양수 = 오른쪽/아래

반환값

Promise<void>

setPosition(position)

댓글 메모를 슬라이드 기준 절대 위치로 이동시킵니다. (상대 이동은 moveBy)

setPosition(position: CommentPosition): Promise<void>;

매개변수

이름타입설명
positionCommentPosition{ x, y } (px 단위 절대 좌표). 생략한 축은 현재값 유지

반환값

Promise<void>

setStyle(style)

댓글 메모 스타일을 변경한다. (getStyle 대칭)

setStyle(style: CommentStyle): Promise<void>;

매개변수

이름타입설명
styleCommentStyle메모 스타일

반환값

Promise<void>

setText(text)

댓글 텍스트를 설정한다. (기존 내용은 대체됨)

setText(text: string): Promise<void>;

매개변수

이름타입설명
textstring댓글 텍스트

반환값

Promise<void>