Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Synap Editor에서 작성된 내용을 텍스트로 가져옵니다Import contents created in Synap Editor as texts.


Parameters:

Name

Type

Attribute

Description

htmlcode

Booleandefault : false이모지가 있는 경우 When there is any emoji, convert it to HTML Character Code in � 형식의 HTML Character Code 로 변환form.

unicode

Booleandefault : false이모지가 있는 경우 \u0000 형식의 Unicode 로 변환When there is any emoji, convert it to Unicode in \u0000 form

remove

Booleandefault : false이모지가 있는 경우 텍스트에서 이모지를 제거When there is any emoji, remove it from the text


Return:

TypeDescription
String에디터에서 작성된 텍스트Text created in the Editor



Example:

Code Block
languagejs
themeEmacs
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'
});

...