RichTextEditor has taken steps to improve image insertion functions. A new and innovative capability is Automatic Image Resizing. If uploaded images are too large to display for your applications (for example the width of image is bigger than MaxImageWidth), automatic resizing makes them fit and keep the original ratio automatically.
How to Enable or Disable Automatic Image Resizing
You can enable or disable automatic image resizing using the following methods:
Edit security policy file
The security policy file (default.config, admin.config and guest.config) can be found in the richtexteditor/config folder. In security policy file you can find the security setting LargeImageMode. This setting defines exactly what will happen to the Images larger than the maximum dimensions set in the settings.
LargeImageMode setting has three values:
- allow - All Images larger than the maximum dimensions will be allowed when uploading.
- deny - All Images larger than the maximum dimensions will be rejected when uploading.
- resize - All Images larger than the maximum dimensions will be proportionally resized to fit within the maximum dimensions when uploading.
You can modify this settings to meet your own requirements.
Programmatically enable or disable Automatic Image Resizing
RichTextEditor provides a powerful method named Editor.SetSecurity that allows you programmatically manage the security settings.
Editor1.SetSecurity("*", "*", "LargeImageMode", "resize");
Send feedback about this topic to CuteSoft. © 2003 - 2014 CuteSoft Components Inc. All rights reserved.