Synap Editor에서 작성된 내용을 텍스트로 가져옵니다.
Parameters:
Name | Type | Attribute | Description |
|---|---|---|---|
options | Object |
|
Return:
| Type | Description |
|---|---|
| String | 에디터에서 작성된 텍스트 |
Example:
var textContent = editor.getTextContent();
if(textContent.trim() !== '') { // 에디터 텍스트 컨텐츠가 공백문자로만 있을 경우를 판단하여 없을경우에만 html을 가져온다.
html = editor.getPublishingHtml();
}
// emoji 옵션
editor.getTextContent({
emoji: 'htmlcode'
});