setText
2.3.0 버전부터 지원합니다.
setText(selector: String, text: String): void
selector로 식별된 특정 DOM 요소에 텍스트를 삽입합니다.
지원되는 DOM 요소: <div>, <td>, <p>.
매개변수
| 이름 | 타입 | 설명 |
|---|---|---|
selector | string | 텍스트를 입력할 DOM의 CSS 선택자 |
text | string | 삽입할 텍스트 |
예시
window.editor.setText('#field', 'Field Text');
window.editor.setText('#name', 'Name Text');
window.editor.setText('#birth', 'Birth day');
window.editor.setText('#address', 'Address');
window.editor.setText('#phone', 'Phone number');
window.editor.setText('#copyright', 'Copyright');