﻿//RadEditorCommandList["Emoticons"] = function(commandName, editor, oTool)
//{    
//	oValue = oTool.GetSelectedValue();        
//	editor.PasteHtml ("<img src='" + oValue + "' border=0>");
//}

    function OnClientCommandExecuting(editor, args)
    {
        var name = args.get_name();
        var val = args.get_value();
        if (name == "Emoticons")
        {
            editor.pasteHtml("<img src='" + val + "'>");
            //Cancel the further execution of the command as such a command does not exist in the editor command list
            args.set_cancel(true);
        }
    }