RELEASE 2.4.1 OR ABOVE
This event occurs before creating a new document.
Adding Event: Using API
var editorId = 'synapEditor';
var editorConfig = {};
var html = '';
var editor = new SynapEditor(editorId, editorConfig, html);
editor.setEventListener('beforeNewDocument', function (e) {
});
Adding Event: Function
var editorId = 'synapEditor';
var editorConfig = {};
var html = '';
function SynapEditorBeforeNewDocument(e) {
}
new SynapEditor(editorId, editorConfig, html);
Adding Event: When the Editor is initialized
var editorId = 'synapEditor';
var editorConfig = {};
var html = '';
var eventListeners = {
beforeNewDocument: function (e) {
}
};
new SynapEditor(editorId, editorConfig, html, eventListeners);
Object Delivered through Functions
In the form of parameter e delivered through functions
e
{
editor: SynapEditor,
eventType: 'beforeNewDocument',
cancelable: true,
returnValue: null
}