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

[Solved] Issue while creating Custom Control

1 Answer 121 Views
Editor
This is a migrated thread and some comments may be shown as answers.
Manish
Top achievements
Rank 1
Manish asked on 19 Jun 2008, 08:41 AM
Hi,

I am trying to create a custom control with the help of below link.

http://www.telerik.com/demos/aspnet/editor/examples/CustomTools/DefaultCS.aspx

1 Answer, 1 is accepted

Sort by
0
Rumen
Telerik team
answered on 23 Jun 2008, 02:05 PM
Hi Manish,

Could you please tell us which version of RadEditor you are using in your web project: RadEditor Classic (/bin/RadEditor.Net2.dll) or RadEditor for ASP.NET AJAX (/bin/Telerik.Web.UI.dll)? This information is important because both editors use different code for creating custom tools.

If you use the classic editor then modify your code like this:

RadEditorCommandList["Custom"] = function(commandName, editor, oTool)
{

       editor
.SetHtml(editor.GetHtml(true) + "<Test Code>");
};

You can get a reference to the editor from the editor paramether of the command list function (see the red marked text above). The SetHtml method sets content in the editor. The GetHtml method retrieves the editor's content.


If you use RadEditor for ASP.NET AJAX then review the following help article on the subject: Adding Your Own Buttons.   

Best regards,
Rumen
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
Tags
Editor
Asked by
Manish
Top achievements
Rank 1
Answers by
Rumen
Telerik team
Share this question
or