Custom addons

Last post 01-26-2009, 3:20 PM by Adam. 1 replies.
Sort Posts: Previous Next
  •  01-26-2009, 10:20 AM 48062

    Custom addons

    I come back with my proble of two addons.
    This is my code:
     
    When I clic the button, MyCmd2 works but for MyCmd1 I get the following error message:
    Command 'MyCmd1' is not supported or is not implemented.
     
        editor.CustomAddons = " <img title=""Using oncommand"" class=""CuteEditorButton"" onmouseover=""CuteEditor_ButtonCommandOver(this)"" onmouseout=""CuteEditor_ButtonCommandOut(this)"" onmousedown=""CuteEditor_ButtonCommandDown(this)"" onmouseup=""CuteEditor_ButtonCommandUp(this)"" ondragstart=""CuteEditor_CancelEvent()"" Command=""MyCmd1"" src=""http://localhost/CarpentersSite/CarpentersAlbumPicturesLogo.asp?idCarp="&pidCarp&""" width=""20"" height=""20""  /><img title=""Using oncommand"" class=""CuteEditorButton"" onmouseover=""CuteEditor_ButtonCommandOver(this)"" onmouseout=""CuteEditor_ButtonCommandOut(this)"" onmousedown=""CuteEditor_ButtonCommandDown(this)"" onmouseup=""CuteEditor_ButtonCommandUp(this)"" ondragstart=""CuteEditor_CancelEvent()"" Command=""MyCmd2"" src=""http://localhost/CarpentersSite/CarpentersAlbumPicturesLogo.asp?idCarp="&pidCarp&""" width=""20"" height=""20""  />"

    <script type="text/javascript">  
    var editor1=document.getElementById("<%= editor.ClientID %>");
    function CuteEditor_OnCommand(editor,command,ui,value)
    {
    //handle the command by yourself
    if(command=="MyCmd1")
    {          
        
    var MaVar = "<%=myValue1%>";
    editor1.PasteHTML(MaVar);       
    return true;

     

    }
    }
    </script>    
    <script type="text/javascript">  
    var editor1=document.getElementById("<%= editor.ClientID %>");
    function CuteEditor_OnCommand(editor,command,ui,value)
    {
    //handle the command by yourself
    if(command=="MyCmd2")
    {          
        
    var MaVar = "<%=myValue1%>";
    editor1.PasteHTML(MaVar);       
    return true;

    }
    }
    </script>

     
     
  •  01-26-2009, 3:20 PM 48070 in reply to 48062

    Re: Custom addons

    if(command=="MyCmd1")
    {
       //do something here
    }
     
    if(command=="MyCmd2")
    {
       //do something here
    }

    asp.net Chat http://cutesoft.net/ASP.NET+Chat/default.aspx
    Web Messenger: http://cutesoft.net/Web-Messenger/default.aspx
    asp.net wysiwyg editor: http://cutesoft.net/ASP.NET+WYSIWYG+Editor/default.aspx
    asp wysiwyg html editor: http://cutesoft.net/ASP
    asp.net Image Gallery: http://cutesoft.net/ASP.NET+Image+Gallery/default.aspx
    Live Support: http://cutesoft.net/live-support/default.aspx

View as RSS news feed in XML