Topbar
Topbar
Sign in
|
Join
|
Client Center
Home
Products
Client Center
Contact
Purchase
Support forums
»
Products
»
Cute Editor for ASP
»
Re: Custom Button Error
Custom Button Error
Last post 07-17-2009, 2:22 PM by
rrowles2000
. 1 replies.
Sort Posts:
Oldest to newest
Newest to oldest
Previous
Next
07-17-2009, 7:28 AM
54058
rrowles2000
Joined on 07-04-2009
Posts 10
Custom Button Error
Reply
Quote
Hi,
Im getting "Command 'OnCommand' is not supported or not implemented" with the following code. Any ideas plz?
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="
"OnCommand"
" src="
"../htmlEditor/CuteEditor_Files/Images/add-image-icon.gif"
" />"
&_
"<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="
"OnCommand"
" src="
"../htmlEditor/CuteEditor_Files/Images/link.gif"
" />"
editor.Width = 600
editor.Height = 240
If
request(
"postback"
) <>
"true"
then
editor.LoadHTML(myFile)
%>
<script language=
"JavaScript"
type=
"text/javascript"
>
var
editor1=document.getElementById(
"<%= editor.ClientID %>"
);
function
CuteEditor_OnCommand(editor,command,ui,value)
{
alert(
'hello'
);
//handle the command by yourself
if
(command==
"MyInsertLink"
)
{
//editor.ExecCommand("InsertTable");
editor1.PasteHTML(
"Hello World"
);
return
true
;
}
}
lt;/script>
07-17-2009, 2:22 PM
54072
in reply to
54058
rrowles2000
Joined on 07-04-2009
Posts 10
Re: Custom Button Error
Reply
Quote
OK, it really helps to put the OnCommand js after drawing the editor. Missed that bit.