Class ImageBlockSettings
Inheritance
Namespace: Syncfusion.EJ2.BlockEditor
Assembly: Syncfusion.EJ2.dll
Syntax
public class ImageBlockSettings : EJTagHelper
Constructors
ImageBlockSettings()
Declaration
public ImageBlockSettings()
Properties
AllowedTypes
Specifies the allowed image file types that can be uploaded. Common types include '.jpg', '.jpeg', and '.png'.
Declaration
public string[] AllowedTypes { get; set; }
Property Value
| Type | Description |
|---|---|
| System.String[] | The default value is null |
ContentTemplate
To get or set value for ContentTemplate.
Declaration
public MvcTemplate<object> ContentTemplate { get; set; }
Property Value
| Type |
|---|
| Syncfusion.EJ2.MvcTemplate<System.Object> |
EnableResize
Specifies whether to enable resize for image.
Declaration
public bool EnableResize { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Boolean | The default value is true |
Height
Specifies the display height of the image. Can be defined in pixels or percentage.
Declaration
public string Height { get; set; }
Property Value
| Type | Description |
|---|---|
| System.String | The default value is "auto" |
MaxFileSize
Specifies the maximum file size allowed for image uploads in bytes. Files exceeding this size will be rejected during validation. Default is 30000000 bytes.
Declaration
public double MaxFileSize { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Double | The default value is 30000000 |
MaxHeight
Specifies the maximum height of the image in pixels or as a string unit. Prevents the image from being resized beyond this value.
Declaration
public string MaxHeight { get; set; }
Property Value
| Type | Description |
|---|---|
| System.String | The default value is "" |
MaxWidth
Specifies the maximum width of the image in pixels or as a string unit. Prevents the image from being resized beyond this value.
Declaration
public string MaxWidth { get; set; }
Property Value
| Type | Description |
|---|---|
| System.String | The default value is "" |
MinHeight
Specifies the minimum height of the image in pixels or as a string unit. Prevents the image from being resized below this value.
Declaration
public string MinHeight { get; set; }
Property Value
| Type | Description |
|---|---|
| System.String | The default value is "" |
MinWidth
Specifies the minimum width of the image in pixels or as a string unit. Prevents the image from being resized below this value.
Declaration
public string MinWidth { get; set; }
Property Value
| Type | Description |
|---|---|
| System.String | The default value is "" |
Path
Specifies the base path for storing and displaying images on the server. This path is appended to the server URL for image storage organization.
Declaration
public string Path { get; set; }
Property Value
| Type | Description |
|---|---|
| System.String | The default value is "" |
SaveFormat
Specifies the format to save the image. Accepts either 'base64' for inline image encoding or 'blob' for binary object representation.
Declaration
public SaveFormat SaveFormat { get; set; }
Property Value
| Type | Description |
|---|---|
| SaveFormat | The default value is SaveFormat.Base64 |
SaveUrl
Specifies the server endpoint URL for uploading images. If empty, server upload functionality is disabled.
Declaration
public string SaveUrl { get; set; }
Property Value
| Type | Description |
|---|---|
| System.String | The default value is "" |
Width
Specifies the display width of the image. Can be defined in pixels or percentage.
Declaration
public string Width { get; set; }
Property Value
| Type | Description |
|---|---|
| System.String | The default value is "auto" |