Page tree
Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Current »

Synap Editor에서 작성된 내용을 텍스트로 가져옵니다.


Parameters:

Name

Type

Attribute

Description

htmlcode

Booleandefault : false이모지가 있는 경우 � 형식의 HTML Character Code 로 변환

unicode

Booleandefault : false이모지가 있는 경우 \u0000 형식의 Unicode 로 변환

remove

Booleandefault : false이모지가 있는 경우 텍스트에서 이모지를 제거


Return:

TypeDescription
String에디터에서 작성된 텍스트



Example:

var textContent = editor.getTextContent();
if(textContent.trim() !== '') { // 에디터 텍스트 컨텐츠가 공백문자로만 있을 경우를 판단하여 없을경우에만 html을 가져온다.
	html = editor.getPublishingHtml();
}


// emoji 옵션
editor.getTextContent({
	emoji: 'htmlcode'
});




  • No labels