TextRun extends Element
텍스트를 편집하는데 사용되는 API 모델입니다The API model used to edit text.
Methods
remove()
Removes the Element 자신을 제거합니다itself.
Status |
---|
| |
---|
subtle | true |
---|
colour | Red |
---|
title | 모든 Element를 제거할 경우 이후의 작업에서 오류가 발생할 수 있습니다If all elements are removed, errors may occur in subsequent operations. |
---|
|
Code Block |
---|
|
var run = editor.getAPIModelById('id');
run.remove(); |
replace(html)
- html <String> 교체할 <String> The HTML String to replace.
Element 자신을 인자로 넘겨받은 HTML String으로 교체합니다Replaces the element itself with the HTML String passed as an argument.
Code Block |
---|
|
var run = editor.getAPIModelById('id');
run.replace('<span>TextRun replaced</span>'); |
setText(text)
- text <String> 문단에 설정할 Text 문자열
...
- <String> Text string to set in the paragraph
Set the text string value passed as an argument to the text run.
Code Block |
---|
|
var run = editor.getAPIModelById('id');
run.setText('텍스트런에 들어가는 내용입니다This is what goes into the text run.'); |