현재 에디터의 Body모델을 AI 입력에 필요한 속성만 필터링하여 JSON Object 또는 JSON String으로 반환합니다.
Parameters:
Name | Type | Attribute | Description |
|---|---|---|---|
toString | boolean | default : false | 현재 에디터 Body 모델을 JSON String으로 반환 받을지 설정합니다. |
| useStyle | boolean | default : false | 스타일을 포함하여 반환 받을지 설정합니다. |
Return:
| Type | Description |
|---|---|
| Object | String | Body 모델 JSON Object 또는 JSON String. |
Example:

var model = editor.getBodyModelJSON(); var model = editor.getBodyModelJSON(true); |
{
"type": "Body",
"children": [
{
"children": [
{
"text": "안녕하세요",
"type": "TextRun"
}
],
"type": "Paragraph"
}
]
} |
{"type":"Body","children":[{"children":[{"text":"안녕하세요","type":"TextRun"}],"type":"Paragraph"}]} |