Status | |||||
---|---|---|---|---|---|
|
...
|
...
|
Selection을 기준으로 HTML Element 배열을 반환합니다. Selection이 지정되지 않은 경우 현재 Selection에 해당하는 HTML Element를 반환합니다.
Parameters:
Name | Type | Attribute | Description |
---|---|---|---|
selectionObject | Object | { | [ Optional ] anchor position과 focus position을 가지는 selection object. 이 값이 없으면 현재 Selection기준으로 동작합니다. |
Return:
Type | Description |
---|---|
HTML Element[] | Selection에 해당하는 HTML Element 배열. 캐럿 상태에서는 캐럿이 위치한 HTML Element를 배열로 반환합니다. |
Example:
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
var elements = editor.getHTMLElements(); console.log(elements[0].innerHTML); |
...