Page tree
Skip to end of metadata
Go to start of metadata

RELEASE 2.10.0 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:

editor.setEventListener('beforePaste', function(data) {
	var html = data.clipboardData.html;
	var text = data.clipboardData.text;
	var data = html ? html : text;
	// Process the data to be pasted.
	editor.setContentsToPaste('<h1>Synap Editor</h1>' + data);
});
  • No labels