﻿//tool handler function
RadEditorCommandList["audio"] = 
//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/audio/AudioRecorderRadAjax.aspx",null,400,340, 
        //function that is executed when the dialog is closed with the return value.
        //see Default.aspx file 
        function(sender, returnValue)
        {
            if(returnValue)
            {
                editor.pasteHtml(returnValue);
            }
        },
         null,
        'Audio Recorder',
        true,
        Telerik.Web.UI.WindowBehaviors.Close + Telerik.Web.UI.WindowBehaviors.Move,
        false,
        true);        
        
};

