CustomAddons

Last post 01-22-2009, 12:48 PM by MuraliC. 3 replies.
Sort Posts: Previous Next
  •  01-21-2009, 10:10 AM 47924

    CustomAddons

    I need to implement more than one CustomAddons like this for example:
     
    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=""MyCmd"" src=""../CarpentersSite/CarpentersAlbumWebSitePictures.asp?idCarp="&pidCarp&"&idPicture=1"" 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=""MyCmd"" src=""../CarpentersSite/CarpentersAlbumWebsitePictures.asp?idCarp="&pidCarp&"&idPicture=2"" width=""20"" height=""20""  />"
     
    The Javascript below makes reference to one MyCmd.
     
       <script type="text/javascript">  
          var editor1=document.getElementById("<%= editor.ClientID %>");
       function CuteEditor_OnCommand(editor,command1,ui,value)
          {
              //handle the command by yourself
              if(command=="MyCmd")
             {          
        
              editor1.PasteHTML("<img src='../CarpentersSite/CarpentersAlbumWebsitePictures.asp?idCarp=2530&idPicture=1'>");
              return true;
             }
             }
             </script>
     
    but of cours I shoud dissociate the two.
     
    How could I do this ?

  •  01-21-2009, 3:55 PM 47937 in reply to 47924

    Re: CustomAddons

    For the first button, you can use Command1.
     
    For the second button, you can use the Command2.
     
     

    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

  •  01-22-2009, 9:14 AM 47954 in reply to 47937

    Re: CustomAddons

    Well I am afraid it does not work. Any other idea ?
  •  01-22-2009, 12:48 PM 47970 in reply to 47954

    Re: CustomAddons

    use Command=""MyCmd"" for first button, Command=""MyCmd1"" for second button.
    give seperate functions under javascript.
     
    function CuteEditor_OnCommand(editor,command,ui,value)
    {
       if(command=="MyCmd")
       {
     
         }
          
     
         if(commane=="MyCmd1")
         {
     
         }
    }
     
    it works.
View as RSS news feed in XML