blockly > comments > CommentEditor

comments.CommentEditor 클래스

댓글 중 입력할 수 있는 부분입니다.

서명:

export declare class CommentEditor implements IFocusableNode 

구현: IFocusableNode

생성자

생성자 수정자 설명
(constructor)(workspace, commentId, onFinishEditing) CommentEditor 클래스의 새 인스턴스를 생성합니다.

속성

속성 수정자 유형 설명
id? 문자열 (선택사항)
workspace WorkspaceSvg

메서드

메서드 수정자 설명
addTextChangeListener(listener) 텍스트 변경사항을 수신 대기하는 콜백을 등록합니다.
canBeFocused()
getDom() 이 댓글 편집기의 DOM 구조를 가져옵니다.
getFocusableElement()
getFocusableTree()
getText() 댓글의 현재 텍스트를 가져옵니다.
onNodeBlur()
onNodeFocus()
removeTextChangeListener(listener) 텍스트 변경 리스너 목록에서 지정된 리스너를 삭제합니다.
setEditable(isEditable) 텍스트 영역을 수정할 수 있는지 여부를 설정합니다. 그렇지 않으면 textarea가 읽기 전용이 됩니다.
setPlaceholderText(text) 빈 댓글에 표시되는 자리표시자 텍스트를 설정합니다.
setText(text) 댓글의 현재 텍스트를 설정하고 변경 리스너를 실행합니다.
updateSize(size, topBarSize) 댓글 편집기 요소의 크기를 업데이트합니다.