﻿//------------------------------------------------------------
// Events fired from editor
// Don't remove the function prototypes
//------------------------------------------------------------
function eventOnBeforeNew()
{
	// do something before creating new document
	
}

function eventOnBeforeLoad()
{
	// do something before loading document
	
}

function eventOnMouseDown()
{
	// to cancel KeyDown return true
	//return true;
	try {
		// used for pinToolbar to close popups
		parent.editOnEditorMouseDown();
	} catch(Error) {}
}

function eventOnKeyDown(e)
{
	// to cancel KeyDown return true
	//return true;
}

// this event is fired when the editor content has been changed
function eventOnChanged()
{
  //alert("Changed");
}

// this event is fired if Control+V is supressed
function eventControlV()
{
  // do something to replace ctrl+v
  // maybe call paste from Word (editPasteWord)
 alert("Control+V pressed");

}

function eventOnProcessTM(aData)
{
	try {
		// used for pinToolbar to close popups
		parent.editOnProcessTM(aData);
	} catch(Error) {}
}

// if the status/combo of the toolbar has to be changed
function eventOnChangeToolbar(data)
{
	try {
		// used for pinToolbar to close popups
		parent.editOnChangeToolbar(data);
	} catch(Error) {}
}

// if the status/combo of the toolbar has to be changed
function eventOnAddStyle(name,html)
{
	try {
		// used for pinToolbar to close popups
		parent.editOnAddStyle(name,html);
	} catch(Error) {}
}

// if a style sheet is read and contains Hx elements then the format combo has to be updated
function eventOnChangeFormat(name,html)
{
	try {
		// used for pinToolbar to close popups
		parent.editOnChangeFormat(name,html);
	} catch(Error) {}
}

function eventOnBlur()
{
	try {
		parent.editOnBlur();
	} catch(Error) {}
}

