This is a migrated thread and some comments may be shown as answers.

InsertEmoticon is not implemented yet

1 Answer 88 Views
Editor
This is a migrated thread and some comments may be shown as answers.
dan
Top achievements
Rank 1
dan asked on 17 Feb 2009, 09:09 AM
hello i am using EditorDropDown but i kip getting this error "the command InsertEmoticon is not implemented yet.
this is my code please help me

EditorDropDown InsertEmoticon = new EditorDropDown("InsertEmoticon"); 
                InsertEmoticon.Text = "Dynamic dropdown"
 
                //Set the popup width and height 
                InsertEmoticon.Attributes["width"] = "110px"; 
                InsertEmoticon.Attributes["popupwidth"] = "240px"; 
                InsertEmoticon.Attributes["popupheight"] = "100px"; 
                                
                for (int i = 1; i < 94; i++) 
                { 
                    InsertEmoticon.Items.Add(new EditorDropDownItem("<IMG SRC='pages/emoticons/"+i+".gif' />", "pages/emoticons/"+i+".gif")); 
                    
                } 
                main.Tools.Add(InsertEmoticon); 
                //main.Tools.Add(InsertEmoticon);   
                editor.OnClientCommandExecuted = "OnClientCommandExecuting"
               string script = "function OnClientCommandExecuting(editor, args)" + 
               "{" + 
                   "var name = args.get_name();" + 
               "var val = args.get_value();" + 
               "if (name == 'InsertEmoticon'){" + 
               "editor.pasteHtml('<img src=\"' + val + '\"/>');" + 
               "args.set_cancel(true);" + 
               "}" + 
               "}"; 
 
                Page.ClientScript.RegisterStartupScript(this.GetType(), "InsertEmoticon", script, true); 

1 Answer, 1 is accepted

Sort by
0
Accepted
Rumen
Telerik team
answered on 19 Feb 2009, 04:53 PM
Hi Dan,

You have attached the OnClientCommandExecuting function to the editor.OnClientCommandExecuted event, instead of to the editor.OnClientCommandExecuting event, which is fired before the command execution. This should do the trick.

Kind regards,
Rumen
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
Tags
Editor
Asked by
dan
Top achievements
Rank 1
Answers by
Rumen
Telerik team
Share this question
or