I am setting up an upload form to allow a user to upload/crop/resize an image and save it to our server. Things work great except I don't want the save dialog. I want to save it to the specific location without them having to enter things. The saving it is not an issue. I have that working now. I just need to know how to eliminate the save dialog box that pops up when you click the toolbar save button?
I have looked through many articles but cannot find one that pertains just to this. Can I use a separate button outside of the editor and still get the cropped/resized image info?
5 Answers, 1 is accepted
0
Hi Stephanie,
The easiest way to skip the Save dialog upon saving is to override the Save command of imageEditor in the following way:
I hope this helps.
Regards,
Vessy
Telerik
The easiest way to skip the Save dialog upon saving is to override the Save command of imageEditor in the following way:
<
telerik:RadImageEditor
ID
=
"RadImageEditor1"
runat
=
"server"
ImageUrl
=
"sample.jpg"
>
</
telerik:RadImageEditor
>
<
script
>
Telerik.Web.UI.ImageEditor.CommandList["Save"] = function (imgEditor, commandName, args) {
imgEditor.saveImageOnServer("", true);
}
</
script
>
I hope this helps.
Regards,
Vessy
Telerik
Do you want to have your say when we set our development plans?
Do you want to know when a feature you care about is added or when a bug fixed?
Explore the
Telerik Feedback Portal
and vote to affect the priority of the items
0
DogBizPro
Top achievements
Rank 1
answered on 06 Aug 2015, 04:18 PM
Thanks! That seems to work. Is there a way to close the RadWindow after saving? Also to set the crop size?
0
Hi Stephanie,
The ImageEditor's client-side ClientSaved event is raised just after the image gets saved so you can add the window closing logic in its handler.
As for the crop side, you can either enable and modify the external Crop dialog of the ImageEditor, or follow the instructions from the following help article in order to make the desired configurations on the client: Custom Crop Settings
Regards,
Vessy
Telerik
The ImageEditor's client-side ClientSaved event is raised just after the image gets saved so you can add the window closing logic in its handler.
As for the crop side, you can either enable and modify the external Crop dialog of the ImageEditor, or follow the instructions from the following help article in order to make the desired configurations on the client: Custom Crop Settings
Regards,
Vessy
Telerik
Do you want to have your say when we set our development plans?
Do you want to know when a feature you care about is added or when a bug fixed?
Explore the
Telerik Feedback Portal
and vote to affect the priority of the items
0
DogBizPro
Top achievements
Rank 1
answered on 12 Aug 2015, 03:49 PM
Thanks! I am not sure that is what I am looking for. I was wanting to make the actual box that appears when you click on the crop icon larger by default. It is very small and you have to drag it every time. Not a huge deal but I thought it would be nicer if is was a reasonable size vs 52x52 pixels.
0
Hello Stephanie,
The initial size of the crop box can be controlled in two possible ways, like mentioned in my previous reply:
Regards,
Vessy
Telerik
The initial size of the crop box can be controlled in two possible ways, like mentioned in my previous reply:
- you can enable the external dialogs of the ImageEditor and modify the initialize method of the Crop.ascx dialog file, by setting the desired initial dimentions or
- you can handle the ImageEditor's client-side ClientCommandExecuted event and set the crop box dimensions in it like demonstrated here: http://docs.telerik.com/devtools/aspnet-ajax/controls/imageeditor/how-to/custom-crop-settings#how-to-customize-a-built-in-command
Regards,
Vessy
Telerik
Do you want to have your say when we set our development plans?
Do you want to know when a feature you care about is added or when a bug fixed?
Explore the
Telerik Feedback Portal
and vote to affect the priority of the items