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

Customise Image Editor

1 Answer 133 Views
Editor
This is a migrated thread and some comments may be shown as answers.
DGraham
Top achievements
Rank 1
DGraham asked on 27 Jan 2010, 01:42 PM

I have several questions regarding the Rad Image Editor:

 

1)      I would like to pass two values (crop x & y) from the main page code behind to the imageEditor? Thus allowing the user to select an area of the image they want to use in the calling page. In addition I would like crop to be enabled in the imageEditor (by default)

2)      Can the number of controls available to the user be reduced (e.g. remove opacity, flip, rotate and crop) what is the best way to customise the imageEditor.aspx file?

3)      Is it possible to have a maximise/restore default icon (in the top right of the window, next to ‘x’ Close) to increase the page size is the user has a large image?

4)       If the user uploads an image that is too big to fit in the imageEditor, is it possible to automatically resize the image to fit the available size?

 

Please note:

 

I am opening the image manager directly using the dialog opener.

 

Telerik Controls Q2 2009 Version 2009.2.826.20

 

I look forward to your reply

1 Answer, 1 is accepted

Sort by
0
Rumen
Telerik team
answered on 01 Feb 2010, 10:14 AM
Hi,

Straight to the points:
1) You can customize the built-in RadEditor dialogs by registering the external dialogs of the editor as it is shown in this demo: Customize Built-in Dialogs.

To pass some parameters from the main page to the Image Editor dialog you should use the set_additionalQueryString method of the dialogOpener element, e.g.

editor.get_dialogOpener().set_additionalQueryString("&MyQueryString=Test123");

To obtain the parameter value from the querystring, you should create a UserControl, add a reference to it in the ImageEditor.ascx file and use Request.QueryString["MyQueryString"].

I attached a sample project demonstrating the scenario on how to set and obtain the querystring information.
The rest of the dialog customization and implementation should be done by the developer using the control.

2. You can hide elements in the ImageEditor.ascx file using style="display:none;" or style="position:absolute;top:-1000px;left:-1000px;".

3. By design, the contents of the ImageEditor are static and if you resize RadWindow their size wont be resized.

4. The following KB article will be helpful for your scenario: Retrieving the size of the uploaded file(s) and restricting file upload.

Greetings,
Rumen
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Tags
Editor
Asked by
DGraham
Top achievements
Rank 1
Answers by
Rumen
Telerik team
Share this question
or