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

« Previous Version 2 Next »

릴리즈 2.6.0 이상

This event occurs when performing a selection operation such as moving the caret and expanding the selection.

이벤트 등록: API 사용

var editorId = 'synapEditor';
var editorConfig = {};
var html = '';
var editor = new SynapEditor(editorId, editorConfig, html);
 
editor.setEventListener('onSelection', function (e) {
});

이벤트 등록: 함수방식

var editorId = 'synapEditor';
var editorConfig = {};
var html = '';
 
function SynapEditorOnSelection(e) {
}
 
new SynapEditor(editorId, editorConfig, html);

이벤트 등록: 에디터 초기화시 등록

var editorId = 'synapEditor';
var editorConfig = {};
var html = '';
var eventListeners = {
    onSelection: function (e) {
    }
};
 
new SynapEditor(editorId, editorConfig, html, eventListeners);


함수로 전달되는 객체 형태

함수로 전달되는 파라미터 e의 형식

e
{
    editor: SynapEditor,       
    eventType:  'onSelection',
    cancelable: false,
    returnValue: null,
	selection: Selection
}


  • No labels