﻿//this is a sample code. Jeong Kyu Eum
//tool handler function
RadEditorCommandList["Resource"] = 
//function name is not needed.
function(commandName,editor,oTool)
{
    // RadEditor old version using editor.ShowDialog function
    // RadEditor Ajax version using editor.showExternalDialog function
    editor.ShowDialog(
        "/common/plugins/RadEditorAjax/Resource/ResourceLibRadAjax.aspx",null,
        //dimension
        800,600, 
        //function that is executed when the dialog is closed with the return value.
        //see Default.aspx file 
        function(returnValue)
        {
            if(returnValue)
            {
                editor.PasteHtml(returnValue);
            }
        },
        null,'');
};

