Telerik Product and Version
|
RadEditor 2016 R2 |
Supported Browsers and Platforms
|
All |
Components/Widgets used (JS frameworks, etc.)
|
|
PROJECT DESCRIPTION
The project here illustrates how add additional fields for the inserted image to consume. This example here adds the additional max-width, min-width, max-height and min-height CSS properties.
Note that these modification will take place not only in ImageProperties dialog, but in ImageManager (Properties tab) too. Additional decoration according to the used Skin and rendering might be needed.
Implementation steps:
- Customize the built-in ImageProperties dialog by using the SetImageProperties.ascx file and copy it in EditorDialogs folder in your project;
- Set the ExternalDialogsPath property to "~/EditorDialogs";
- Add the HTML for the new fields:
SetImageProperties.ascx:687:
- Assign corresponding instances in the _setupChilder method:
SetImageProperties.ascx:440:
- Load the values from the image selected in the HTML fields:
SetImageProperties.ascx:142:
SetImageProperties.ascx:113:
- Process the HTML fields in getModifiedImage method to update the image selected:
SetImageProperties.ascx:333:
- Improve the height of the dialog to fit the new design (the styles are for Default skin if you are using different skin or rendering make sure to further adjust the CSS):
SetImageProperties.ascx:649: