Page tree

Versions Compared

Key

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

...

에디터에서 Selection 정보를 반환합니다. Selection 정보는 아래와 같이 네가지 위치정보를 포함하고 있습니다.

종류설명
start문서상에서 Selection의 시작위치
end문서상에서 Selection의 마지막 위치
anchorSelection을 시작한 위치 (ex; 마우스를 클릭 후 Darg한 경우 마우스를 클릭한 위치)
focusSelection이 끝난 위치


Example:

Code Block
languagejs
themeEmacs
var selection = editor.getSelection();
var startPosition = selection.start;

...