Page tree

Versions Compared

Key

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

Status
colourYellow
title
릴리즈
Release 2.6.0
이상

캐럿 이동 및 셀렉션 확장 등의 셀렉션 동작을 할 때 발생합니다. 

...

or Above

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

Adding Event: Using API

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

...


Adding Event:

...

Function

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

...

Adding Event: When the Editor is initialized

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

...


...

Object Delivered through Functions

In the form of parameter e delivered through functions

Code Block
languagejs
titlee
{
    editor: SynapEditor,       
    eventType:  'onSelection',
    cancelable: false,
    returnValue: null,
	selection: Selection
}

...