Page tree

Versions Compared

Key

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

Status
colourYellow
title
릴리즈
Release 2.10.0
이상붙여넣을 html contents를 설정합니다. beforePaste 이벤트에서 클립보드 DATA를 보정해서 설정하는데 사용합니다
or Above

Set the html contents to be pasted. It is used to correct and set the clipboard data in the beforePaste event.

Parameters:

Name

Type

Description

htmlString

실제 에디터에 붙여넣을 HTML DATA to paste into the editor

Example:

Code Block
languagejs
themeEmacs
editor.setEventListener('beforePaste', function(data) {
	var html = data.clipboardData.html;
	var text = data.clipboardData.text;
	var data = html ? html : text;
	// 붙여넣을 DATA 처리 Process the data to be pasted.
	editor.setContentsToPaste('<h1>사이냅에디터<<h1>Synap Editor</h1>' + data);
});