...
| Name | Type | Attribute | Description |
|---|
| wrap | boolean | default : false | 편집한 내용을 <html> tag로 둘러쌀지 결정합니다. |
| emojiEscapes | boolean | default : false | emoji 문자를 HTML Entity 형태로 변경할지 결정합니다. |
| specialCharacterEscapes | boolean | default: false | 특수문자를 HTML Entity 형태로 변경할지 결정합니다. |
| contentPadding | object | default : 'none' | 문서 여백에 대한 값을 결정합니다. 'document': 임포트한 문서의 여백을 사용. 'none': 여백을 사용하지 않음. |
| boolean | default: true | 문서 너비를 반환할지 여부를 결정합니다. |
| boolean | default: false | id가 유지되도록 할 지 여부를 결정합니다. |
| string | default: '' | 컨텐츠 영역에서 특정 요소를 찾을 셀렉터 입니다. |
Return:
| Type | Description |
|---|
| String | 사이냅에디터에서 편집한 HTML 콘텐츠 |
...
| Code Block |
|---|
| language | xml |
|---|
| theme | Emacs |
|---|
| title | 결과 값 |
|---|
|
...<span>←︎↑︎→︎↓︎↔︎↕︎↦︎↖︎</span>... |
selector을 이용해서 문서의 특정부분을 가져오기
| Code Block |
|---|
|
var html = editor.getPublishingHtml({'selector': '#test'}); |
원본 HTML
| Code Block |
|---|
| language | xml |
|---|
| theme | Emacs |
|---|
| title | 결과 값 |
|---|
|
<div class="se-contents" role="textbox" style="box-sizing: content-box; font-family: "맑은 고딕"; font-size: 11pt; line-height: 1.2;" data-document-padding-top="18" data-document-padding-bottom="18" data-document-padding-left="23" data-document-padding-right="23"><p id="test" style="margin: 16px 0px; display: block; overflow-wrap: break-word;"><span>test</span></p></div> |
selector 옵션을 이용한 결과 HTML
| Code Block |
|---|
| language | xml |
|---|
| theme | Emacs |
|---|
| title | 결과 값 |
|---|
|
<p id="test" style="margin: 16px 0px; display: block; overflow-wrap: break-word;"><span>test</span></p> |