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>