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

The way to customize EditorDialog and context menu

1 Answer 76 Views
Editor
This is a migrated thread and some comments may be shown as answers.
Vincent
Top achievements
Rank 1
Vincent asked on 14 Dec 2010, 12:32 AM
Hi Telerik Team

I have two issues at the moment.

1. Context Menu on image
I'd like to remove the "Image Editor Map" option and leave "Properties" there, is it possible?

2. External Dialog for Image Editor
I tried to hide few sections which I didn't need it. e.g. CSS Class, Image Src and Long Description. When I set display property none on CSS class, Image Src, it does perfectly and the most important thing is the dialog automatically re-sized, but if I set this property on the row of "Long Description", the dialog suddenly lose the auto re-size function.  I don't know whether there are some hidden functions which does this trick.

 

1 Answer, 1 is accepted

Sort by
0
Accepted
Rumen
Telerik team
answered on 16 Dec 2010, 10:48 AM
Hello Vincent,

Straight to the points:
1) You can remove the Image Map option from the context menu using the following code:

 //make sure the tools file is loaded
RadEditor1.EnsureToolsFileLoaded();
EditorContextMenu imgTag = RadEditor1.ContextMenus.FindByTagName("IMG");
//remove the Image Map tool
imgTag.Tools.Remove(imgTag.Tools[1]);

More information about the editor's context menus is available in this article: Context Menus.

2) You can resize the Set Image Options dialog using the following server code:

 protected override void OnPreRenderComplete(System.EventArgs e)
{
base.OnPreRenderComplete(e);
DialogDefinition imagePropertiesDialog = RadEditor1.GetDialogDefinition("ImageProperties");
imagePropertiesDialog.Height = Unit.Pixel(300);
}


Regards,
Rumen
the Telerik team
Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.
Tags
Editor
Asked by
Vincent
Top achievements
Rank 1
Answers by
Rumen
Telerik team
Share this question
or