Page tree
Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 2 Next »

릴리즈 3.0.0 이상

Selection을 기준으로 HTML Element 배열을 반환합니다. Selection이 지정되지 않은 경우 현재 Selection에 해당하는 HTML Element를 반환합니다.


Parameters:

Name

Type

Attribute

Description

toString

boolean

default : false

[ Optional ] 현재 에디터 Body 모델을 JSON Object로 반환 받을지, JSON String으로 반환 받을지 설정합니다. 

Return:

TypeDescription
Object | StringParameter에 따른 Body 모델 JSON Object 또는 JSON String.



Example:

selection을 지정하지 않은 경우
var elements = editor.getHTMLElements();
console.log(elements[0].innerHTML);
Selection을 지정한 경우
var selection = editor.getSelection();
var elements = editor.getHTMLElements(selection);
console.log(elements[0].innerHTML);
  • No labels