Page tree

Versions Compared

Key

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

Status
colourYellow
title릴리즈 Release 2.8.0 이상or Above
 

Synap Editor에서 편집된 내용이 있는지 여부를 판단합니다'It determines whether there is any edited content in Synap Editor.


Return:

TypeDescription
Boolean true || false (편집된 내용이 있을경우 true를 반환합니다Returns true if there is edited content.)

주의) Note: The isEdited() 함수는 빠른 편집여부 확인을 위해 undo stack을 이용해서 편집여부를 판단하고 있습니다. 실제 변경된 내용이 없는 경우("가"를 입려하고  Backspace를 "가"를 지운경우)에도 편집이 있었다고 판단 할 수 있습니다function uses the undo stack to quickly check whether there is edited content. Even if there is no actual change (if you enter "A" and delete it with the backspace key), it can be judged there was editing.

Example:

Code Block
languagejs
themeEmacs
var html;
if(!editor.isEdited()) { // 에디터에 편집된 내용이 있다고 판단되는 경우에만 html을 가져온다 HTML is imported only when it is determined that there is edited content in the editor.
	html = editor.getPublishingHtml();
}

...