CustomAddons

  •  01-21-2009, 10:10 AM

    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 ?

View Complete Thread