﻿//tool handler function
RadEditorCommandList["formula"] = 
//function name is not needed.
function(commandName,editor,oTool)
{
    // RadEditor old version using editor.ShowDialog function
    // RadEditor Ajax version using editor.showExternalDialog function
    editor.showExternalDialog(
        "/common/plugins/RadEditorAjax/formula/WebEQDesignerRadAjax.aspx",null,800,330, 
        //function that is executed when the dialog is closed with the return value.
        //see Default.aspx file 
        //this is RadEditor Ajax version
        function(sender, returnValue)
        {
            if(returnValue)
            {
                editor.pasteHtml(returnValue);
            }
        },
        null,
        'Fomula',
        true,
        Telerik.Web.UI.WindowBehaviors.Close + Telerik.Web.UI.WindowBehaviors.Move,
        false,
        true);    
};

