Synap Editor에서 작성된 내용을 텍스트로 가져옵니다Import contents created in Synap Editor as texts.
Parameters:
Name | Type | Attribute | Description |
---|---|---|---|
htmlcode | Boolean | default : false | 이모지가 있는 경우 When there is any emoji, convert it to HTML Character Code in � 형식의 HTML Character Code 로 변환form. |
unicode | Boolean | default : false | 이모지가 있는 경우 \u0000 형식의 Unicode 로 변환When there is any emoji, convert it to Unicode in \u0000 form |
remove | Boolean | default : false이모지가 있는 경우 텍스트에서 이모지를 제거 | When there is any emoji, remove it from the text |
Return:
Type | Description |
---|---|
String에디터에서 작성된 텍스트 | Text created in the Editor |
Example:
Code Block | ||||
---|---|---|---|---|
| ||||
var textContent = editor.getTextContent(); if(textContent.trim() !== '') { // 에디터 텍스트 컨텐츠가 공백문자로만 있을 경우를 판단하여 없을경우에만 html을 가져온다 Check if the text contents in the Editor consists of blank characters only and import html only when there is none. html = editor.getPublishingHtml(); } // emojiEmoji 옵션option editor.getTextContent({ emoji: 'htmlcode' }); |
...