The Image Editor is a graphical user interface for editing images.
<div style="height: 500px">
<div id='imageeditor'></div>
</div>
import { ImageEditor } from '@syncfusion/ej2-image-editor';
let imageObj: ImageEditor = new ImageEditor({
});
imageObj.appendTo('#imageeditor');
boolean
Specifies a boolean value whether enable undo/redo operations in the image editor.
Defaults to true
string
Defines one or more CSS classes that can be used to customize the appearance of an Image Editor component.
Defaults to ”
boolean
Defines whether an Image Editor component is enabled or disabled.
Defaults to false
Specifies the finetune settings option which can be used to perform color adjustments in the image editor control.
<div style="height: 500px">
<div id='imageeditor'></div>
</div>
import { ImageEditor } from '@syncfusion/ej2-image-editor';
let imageObj: ImageEditor = new ImageEditor({
finetuneSettings: {
brightness: { min: -100, max: 100, defaultValue: 0 },
contrast: { min: -100, max: 100, defaultValue: 0 }
}
});
imageObj.appendTo('#imageeditor');
Predefine the font families that populate in font family dropdown list from the toolbar.
string
Specifies the height of the Image Editor.
Defaults to ‘100%’
string
Overrides the global culture and localization value for this component. Default global culture is ‘en-US’.
Defaults to ”
string
| Function
Specifies a template for the quick access toolbar. Use this property to customize the quick access toolbar.
Defaults to null
Specifies the selection settings to customize selection. A ‘SelectionSettingsModel’ value that specifies the the customization related options which are enabled in image editor control. The default value is null.
boolean
Specifies whether to show/hide the quick access toolbar.
Defaults to true
string
| Theme
Specifies the theme of the Image Editor. The appearance of the shape selection in Image Editor is determined by this property.
Defaults to Theme.Bootstrap5
[]
Specifies the toolbar items to perform UI interactions. It accepts both string[] and ItemModel[] to configure its toolbar items. The default value is null. If the property is not defined in the control, the default toolbar will be rendered with preconfigured toolbar commands. If the property is defined as empty collection, the toolbar will not be rendered. The preconfigured toolbar commands are
<div style="height: 500px">
<div id='imageeditor'></div>
</div>
import { ImageEditor } from '@syncfusion/ej2-image-editor';
let imageObj: ImageEditor = new ImageEditor({
toolbar: ['Crop', 'ZoomIn', 'ZoomOut', 'Transform', {text: 'Custom'}]
});
imageObj.appendTo('#imageeditor');
Defaults to null
string
| Function
Specifies a custom template for the toolbar of an image editor control. A string that specifies a custom template for the toolbar of the image editor. If this property is defined, the ‘toolbar’ property will not have any effect.
<div style="height: 500px">
<div id='imageeditor'></div>
</div>
<script id="toolbarTemplate" type="text/x-template">
<div class = 'e-toolbar'>
<button id= 'dltbtn'>Custom</button>
</div>
</script>
import { ImageEditor } from '@syncfusion/ej2-image-editor';
let imageObj: ImageEditor = new ImageEditor({
toolbarTemplate: '#toolbarTemplate'
});
imageObj.appendTo('#imageeditor');
Defaults to null
string
Specifies the width of an Image Editor.
Defaults to ‘100%’
Specifies the zoom settings to perform zooming action. A ‘ZoomSettingsModel’ value that specifies the the zoom related options which are enabled in image editor control. The default value is null.
<div style="height: 500px">
<div id='imageeditor'></div>
</div>
import { ImageEditor, ZoomTrigger } from '@syncfusion/ej2-image-editor';
let imageObj: ImageEditor = new ImageEditor({
zoomSettings: {
minZoomFactor: 1,
maxZoomFactor: 100,
zoomFactor: 1,
zoomTrigger: ZoomTrigger.MouseWheel | ZoomTrigger.Pinch | ZoomTrigger.Toolbar | ZoomTrigger.Commands,
zoomPoint: new Point {x: 500, y: 500}
}
});
imageObj.appendTo('#imageeditor');
Adds the handler to the given event listener.
Parameter | Type | Description |
---|---|---|
eventName | string |
A String that specifies the name of the event |
handler | Function |
Specifies the call to run when the event occurs. |
Returns void
Appends the control within the given HTML element
Parameter | Type | Description |
---|---|---|
selector (optional) | string | HTMLElement |
Target element where control needs to be appended |
Returns void
Applies the operations performed in the Image Editor, such as annotation drawings.
Returns void
Filtering an image with the given type of filters.
Parameter | Type | Description |
---|---|---|
filterOption | ImageFilterOption |
Specifies the filter options to the image. |
Returns void
Adding unload event to persist data when enable persistence true
Returns void
Moves a shape to ahead of one shape based on the given shape id. Use ‘getShapeSettings’ method to get the shape id which is then passed to perform moving.
Parameter | Type | Description |
---|---|---|
shapeId | string |
Specifies the shape id to move the shape on an image. |
Returns void
Moves a shape to the front of all other shapes based on the given shape id. Use ‘getShapeSettings’ method to get the shape id which is then passed to perform moving.
Parameter | Type | Description |
---|---|---|
shapeId | string |
Specifies the shape id to move the shape on an image. |
Returns void
Specifies if it’s possible to redo the last recent action made in an Image Editor.
Returns boolean
Specifies if it’s possible to undo the last recent action made in an Image Editor.
Returns boolean
Clears the loaded image in the Image Editor.
Returns void
Clears the current selection performed in the image editor.
Parameter | Type | Description |
---|---|---|
resetCrop (optional) | boolean |
Specifies to reset last cropped image. |
Returns void
Duplicates a shape based on the given shape ID in the ImageEditor. Use ‘getShapeSettings’ method to get the shape and then pass a shapeId from the returned shape to clone a shape.
Parameter | Type | Description |
---|---|---|
shapeId | string |
Specifies the shape id to clone a shape on an image. |
Returns boolean
Crops an image based on the selection done in the image editor.
<div style="height: 500px">
<div id='imageeditor'></div>
</div>
import { ImageEditor } from '@syncfusion/ej2-image-editor';
let imageObj: ImageEditor = new ImageEditor({
created: () => {
imageObj.open('https://ej2.syncfusion.com/demos/src/image-editor/images/bridge.png');
imageObj.select('16:9', 10, 10);
imageObj.crop();
}
});
imageObj.appendTo('#imageeditor');
Returns boolean
When invoked, applies the pending property changes immediately to the component.
Returns void
Deletes a redaction based on the given shape id. Use ‘getRedacts’ method to get the redaaction id which is then passed to perform deletion.
Parameter | Type | Description |
---|---|---|
id | string |
Specifies the redaction id to delete the redaction on an image. |
Returns void
Deletes a shape based on the given shape id. Use ‘getShapeSettings’ method to get the shape id which is then passed to perform selection.
<div style="height: 500px">
<div id='imageeditor'></div>
</div>
import { ImageEditor } from '@syncfusion/ej2-image-editor';
let imageObj: ImageEditor = new ImageEditor({
created: () => {
imageObj.open('https://ej2.syncfusion.com/demos/src/image-editor/images/bridge.png');
let dimension: any = imageEditorObj.getImageDimension();
imageObj.drawEllipse(dimension.x, dimension.y, 40, 60);
imageObj.drawEllipse(dimension.x, dimension.y+80, 40, 130);
imageObj.selectShape('shape_1');
}
});
imageObj.appendTo('#imageeditor');
Parameter | Type | Description |
---|---|---|
id | string |
Specifies the shape id to delete the shape on an image. |
Returns void
Removing unload event to persist data when enable persistence true
Returns void
Discards the operations performed in the Image Editor, such as annotation drawings.
Returns void
Draw arrow on an image.
Parameter | Type | Description |
---|---|---|
startX (optional) | number |
– Specifies start point x-coordinate of arrow. |
startY (optional) | number |
– Specifies start point y-coordinate of arrow. |
endX (optional) | number |
Specifies end point x-coordinates of arrow. |
endY (optional) | number |
Specifies end point y-coordinates of the arrow. |
strokeWidth (optional) | number |
Specifies the stroke width of arrow. |
strokeColor (optional) | string |
Specifies the stroke color of arrow. |
arrowStart (optional) | ArrowheadType |
– Specifies the type of arrowhead for start position. The default value is ‘None’. |
arrowEnd (optional) | ArrowheadType |
– Specifies the type of arrowhead for end position. The default value is ‘SolidArrow’. |
isSelected (optional) | boolean |
Specifies to show the arrow in the selected state. |
Returns boolean
Draw ellipse on an image.
<div style="height: 500px">
<div id='imageeditor'></div>
</div>
import { ImageEditor } from '@syncfusion/ej2-image-editor';
let imageObj: ImageEditor = new ImageEditor({
created: () => {
imageObj.open('https://ej2.syncfusion.com/demos/src/image-editor/images/bridge.png');
let dimension: any = imageEditorObj.getImageDimension();
imageObj.drawEllipse(dimension.x, dimension.y, 40, 60);
}
});
imageObj.appendTo('#imageeditor');
Parameter | Type | Description |
---|---|---|
x (optional) | number |
Specifies x-coordinate of ellipse. |
y (optional) | number |
Specifies y-coordinate of ellipse. |
radiusX (optional) | number |
Specifies the radius x point for the ellipse. |
radiusY (optional) | number |
Specifies the radius y point for the ellipse. |
strokeWidth (optional) | number |
Specifies the stroke width of ellipse. |
strokeColor (optional) | string |
Specifies the stroke color of ellipse. |
fillColor (optional) | string |
Specifies the fill color of the ellipse. |
degree (optional) | number |
Specifies the degree to rotate the ellipse. |
isSelected (optional) | boolean |
Specifies to show the ellipse in the selected state. |
Returns boolean
Draw a frame on an image.
Parameter | Type | Description |
---|---|---|
frameType | FrameType |
Specifies the frame option to be drawn on an image. |
color (optional) | string |
Specifies the color of a frame on an image. The default value is ‘#fff’. |
gradientColor (optional) | string |
Specifies the gradient color of a frame on an image. The default value is ‘’. |
size (optional) | number |
Specifies the size of the frame as a percentage. It can be provided as an integer percentage (e.g., 10). Defaults to 20 if not specified. |
inset (optional) | number |
Specifies the inset value for line, hook, and inset type frames, as a percentage. It can be provided as an integer percentage (e.g., 10). Defaults to 0 if not specified. |
offset (optional) | number |
Specifies the offset value for line and inset type frames, as a percentage. It can be provided as an integer percentage (e.g., 10). Defaults to 0 if not specified. |
borderRadius (optional) | number |
Specifies the border radius for line-type frames, as a percentage. It can be provided as an integer percentage (e.g., 10). Defaults to 0 if not specified. |
frameLineStyle (optional) | FrameLineStyle |
Specifies the type of line to be drawn for line-type frames. Default to Solid if not specified. |
lineCount (optional) | number |
Specifies the number of lines for line-type frames. Defaults to 0 if not specified. |
Returns boolean
Draw an image as annotation on an image.
Parameter | Type | Description |
---|---|---|
data | string | ImageData |
Specifies url of the image or image data. |
x (optional) | number |
Specifies x-coordinate of a starting point for an image. |
y (optional) | number |
Specifies y-coordinate of a starting point for an image. |
width (optional) | number |
Specifies the width of the image. |
height (optional) | number |
Specifies the height of the image. |
isAspectRatio (optional) | boolean |
Specifies whether to maintain aspect ratio or not. |
degree (optional) | number |
Specifies the degree to rotate the image. |
opacity (optional) | number |
Specifies the value for the image. |
isSelected (optional) | boolean |
Specifies to show the image in the selected state. |
Returns boolean
Draw line on an image.
Parameter | Type | Description |
---|---|---|
startX (optional) | number |
– Specifies start point x-coordinate of line. |
startY (optional) | number |
– Specifies start point y-coordinate of line. |
endX (optional) | number |
Specifies end point x-coordinates of line. |
endY (optional) | number |
Specifies end point y-coordinates of the line. |
strokeWidth (optional) | number |
Specifies the stroke width of line. |
strokeColor (optional) | string |
Specifies the stroke color of line. |
isSelected (optional) | boolean |
Specifies to show the line in the selected state. |
Returns boolean
Draw path on an image.
Parameter | Type | Description |
---|---|---|
pointColl | Point[] |
– Specifies collection of start and end x, y-coordinates of path. |
strokeWidth (optional) | number |
Specifies the stroke width of path. |
strokeColor (optional) | string |
Specifies the stroke color of path. |
isSelected (optional) | boolean |
Specifies to show the path in the selected state. |
Returns boolean
Draw a rectangle on an image.
Parameter | Type | Description |
---|---|---|
x (optional) | number |
Specifies x-coordinate of rectangle. |
y (optional) | number |
Specifies y-coordinate of rectangle. |
width (optional) | number |
Specifies the width of the rectangle. |
height (optional) | number |
Specifies the height of the rectangle. |
strokeWidth (optional) | number |
Specifies the stroke width of rectangle. |
strokeColor (optional) | string |
Specifies the stroke color of rectangle. |
fillColor (optional) | string |
Specifies the fill color of the rectangle. |
degree (optional) | number |
Specifies the degree to rotate the rectangle. |
isSelected (optional) | boolean |
Specifies to show the rectangle in the selected state. |
borderRadius (optional) | number |
Specifies the radius to apply border radius to rectangle. |
Returns boolean
Draw a redaction on an image.
Parameter | Type | Description |
---|---|---|
type (optional) | RedactType |
– Optional. Specifies the type of redaction to be drawn on the image such as blur or pixelate. If not specified, the redaction drawing is initiated with the default blur value. |
x (optional) | number |
– Optional. Specifies x-coordinate of redaction. If not specified, the redaction drawing is initiated with the first parameter. |
y (optional) | number |
– Optional. Specifies y-coordinate of redaction. If not specified it draws redaction from the center point of the image. |
width (optional) | number |
– Optional. Specifies the width of the redaction. The default value is 100. |
height (optional) | number |
– Optional. Specifies the height of the redaction. The default value is 50. |
value (optional) | number |
– Optional. Specifies the blur value for blur-type redaction or the pixel size for pixelate-type redaction. Defaults to 20 since the default redaction is blur. |
Returns boolean
Draw a text on an image.
<div style="height: 500px">
<div id='imageeditor'></div>
</div>
import { ImageEditor } from '@syncfusion/ej2-image-editor';
let imageObj: ImageEditor = new ImageEditor({
created: () => {
imageObj.open('https://ej2.syncfusion.com/demos/src/image-editor/images/bridge.png');
let dimension: any = imageEditorObj.getImageDimension();
imageObj.drawText(dimension.x, dimension.y, 'Syncfusion', 'Arial', 12, true, true, '#000');
}
});
imageObj.appendTo('#imageeditor');
Parameter | Type | Description |
---|---|---|
x (optional) | number |
Specifies x-coordinate of text. |
y (optional) | number |
Specifies y-coordinate of text. |
text (optional) | string |
Specifies the text to add on an image. |
fontFamily (optional) | string |
Specifies the font family of the text. |
fontSize (optional) | number |
Specifies the font size of the text. |
bold (optional) | boolean |
Specifies whether the text is bold or not. |
italic (optional) | boolean |
Specifies whether the text is italic or not. |
color (optional) | string |
Specifies font color of the text. |
isSelected (optional) | boolean |
Specifies to show the text in the selected state. |
degree (optional) | number |
Specifies the degree to rotate the text. |
fillColor (optional) | string |
Specifies the background Color of the text. |
strokeColor (optional) | string |
Specifies the outline color of the text annotation. |
strokeWidth (optional) | number |
Specifies the outline stroke width of the text annotation. |
Returns boolean
Enable or disable a shape drawing option in an Image Editor.
Parameter | Type | Description |
---|---|---|
shapeType | ShapeType |
Specifies the type of shape to be enabled or disabled for drawing. |
isEnabled | boolean |
Optional. Specifies a value to indicate whether to enable or disable shape drawing. The default value is true. |
Returns void
Enable text area editing in the ImageEditor.
Returns void
Export an image using the specified file name and the extension.
Parameter | Type | Description |
---|---|---|
type (optional) | string |
Specifies a format of image to be saved. |
fileName (optional) | string |
– Specifies a file name to be saved |
imageQuality (optional) | number |
– Specifies the quality of an image to be saved. The default value is “1” which represents the original size of the image if not specified. |
Returns void
Finetuning an image with the given type of finetune and its value in the image editor.
Parameter | Type | Description |
---|---|---|
finetuneOption | ImageFinetuneOption |
Specifies the finetune options to be performed in the image. |
value | number |
Specifies the value for finetuning the image. |
Returns void
Flips an image by horizontally or vertically in the image editor.
<div style="height: 500px">
<div id='imageeditor'></div>
</div>
import { ImageEditor } from '@syncfusion/ej2-image-editor';
let imageObj: ImageEditor = new ImageEditor({
created: () => {
imageObj.open('https://ej2.syncfusion.com/demos/src/image-editor/images/bridge.png');
imageObj.zoom(40, {x: 400, y: 400});
}
});
imageObj.appendTo('#imageeditor');
Parameter | Type | Description |
---|---|---|
direction | Direction |
Specifies the direction to flip the image. A horizontal direction for horizontal flipping and vertical direction for vertical flipping. |
Returns void
Enable or disable a freehand drawing in an Image Editor.
Parameter | Type | Description |
---|---|---|
value | boolean |
Specifies a value whether to enable or disable freehand drawing. |
Returns void
Returns an image as ImageData to load it in to a canvas.
Returns ImageData
Get the dimension of an image in the image editor such as x, y, width, and height. The method helps to get dimension after cropped an image.
Returns Dimension
Update filter to the canvas in the ImageEditor.
Parameter | Type | Description |
---|---|---|
filterOption | ImageFilterOption |
Specifies the filter options to the image. |
Returns string
Returns the persistence data for component
Returns any
Get all the shapes details which is drawn on an image editor.
Returns RedactSettings[]
Returns the route element of the component
Returns HTMLElement
Get particular shapes details based on id of the shape which is drawn on an image editor.
<div style="height: 500px">
<div id='imageeditor'></div>
</div>
import { ImageEditor, ShapeSettings } from '@syncfusion/ej2-image-editor';
let imageObj: ImageEditor = new ImageEditor({
created: () => {
imageObj.open('https://ej2.syncfusion.com/demos/src/image-editor/images/bridge.png');
let dimension: any = imageEditorObj.getImageDimension();
imageObj.drawEllipse(dimension.x, dimension.y, 40, 60);
imageObj.drawEllipse(dimension.x, dimension.y+80, 40, 130);
let shape: ShapeSettings = imageObj.getShapeSetting('shape_1');
console.log(shape.type);
}
});
imageObj.appendTo('#imageeditor');
Parameter | Type | Description |
---|---|---|
id | string |
Specifies the shape id on an image. |
Returns ShapeSettings
Get all the shapes details which is drawn on an image editor.
Returns ShapeSettings[]
Handling unload event to persist data when enable persistence true
Returns void
Opens an image as URL or ImageData for editing in an image editor.
Returns void
Enable or disable a panning on the Image Editor.
Parameter | Type | Description |
---|---|---|
value | boolean |
Specifies a value whether enable or disable panning. |
x (optional) | number |
Optional, Specifies a value to pan the image horizontally. |
y (optional) | number |
Optional, Specifies a value to pan the image vertically. |
Returns void
Redo the last user action that was undone by the user or undo
method.
Returns void
Applies all the pending property changes and render the component again.
Returns void
Removes the handler from the given event listener.
Parameter | Type | Description |
---|---|---|
eventName | string |
A String that specifies the name of the event to remove |
handler | Function |
Specifies the function to remove |
Returns void
Reset all the changes done in an image editor and revert to original image.
Returns void
Resize an image by changing its width and height.
Parameter | Type | Description |
---|---|---|
width | number |
Specifies the width of an image. |
height | number |
Specifies the height of an image. |
isAspectRatio (optional) | boolean |
Specifies whether the scaling option is enabled or not. |
Returns boolean
Rotate an image to clockwise and anti-clockwise.
<div style="height: 500px">
<div id='imageeditor'></div>
</div>
import { ImageEditor } from '@syncfusion/ej2-image-editor';
let imageObj: ImageEditor = new ImageEditor({
created: () => {
imageObj.open('https://ej2.syncfusion.com/demos/src/image-editor/images/bridge.png');
imageObj.rotate(90);
}
});
imageObj.appendTo('#imageeditor');
Parameter | Type | Description |
---|---|---|
degree | number |
Specifies a degree to rotate an image. A positive integer value for clockwise and negative integer value for anti-clockwise rotation. |
Returns boolean
Perform selection in an image editor. The selection helps to crop an image.
<div style="height: 500px">
<div id='imageeditor'></div>
</div>
import { ImageEditor } from '@syncfusion/ej2-image-editor';
let imageObj: ImageEditor = new ImageEditor({
created: () => {
imageObj.open('https://ej2.syncfusion.com/demos/src/image-editor/images/bridge.png');
imageObj.select('16:9', 10, 10);
}
});
imageObj.appendTo('#imageeditor');
Parameter | Type | Description |
---|---|---|
type | string |
Specifies the shape - circle / square / custom selection / pre-defined ratios. |
startX (optional) | number |
– Specifies the start x-coordinate point of the selection. |
startY (optional) | number |
– Specifies the start y-coordinate point of the selection. |
width (optional) | number |
Specifies the width of the selection area. |
height (optional) | number |
Specifies the height of the selection area. |
Returns void
Select a redaction based on the given redaction id. Use ‘getRedacts’ method to get the shape id which is then passed to perform selection.
Parameter | Type | Description |
---|---|---|
id | string |
Specifies the shape id to select a redact on an image. |
Returns boolean
Select a shape based on the given shape id. Use ‘getShapeSettings’ method to get the shape id which is then passed to perform selection.
<div style="height: 500px">
<div id='imageeditor'></div>
</div>
import { ImageEditor } from '@syncfusion/ej2-image-editor';
let imageObj: ImageEditor = new ImageEditor({
created: () => {
imageObj.open('https://ej2.syncfusion.com/demos/src/image-editor/images/bridge.png');
let dimension: any = imageEditorObj.getImageDimension();
imageObj.drawEllipse(dimension.x, dimension.y, 40, 60);
imageObj.drawEllipse(dimension.x, dimension.y+40, 40, 130);
imageObj.selectShape('shape_1');
}
});
imageObj.appendTo('#imageeditor');
Parameter | Type | Description |
---|---|---|
id | string |
Specifies the shape id to select a shape on an image. |
Returns boolean
Moves a shape to behind one shape based on the given shape id. Use ‘getShapeSettings’ method to get the shape id which is then passed to perform moving.
Parameter | Type | Description |
---|---|---|
shapeId | string |
Specifies the shape id to move the shape on an image. |
Returns void
Moves a shape to behind all other shapes based on the given shape id. Use ‘getShapeSettings’ method to get the shape id which is then passed to perform moving.
Parameter | Type | Description |
---|---|---|
shapeId | string |
Specifies the shape id to move the shape on an image. |
Returns void
Straightens an image by rotating it clockwise or counterclockwise.
Parameter | Type | Description |
---|---|---|
degree | number |
The degree value specifying the amount of rotation for straightening the image. Positive values indicate clockwise rotation, while negative values indicate counterclockwise rotation. |
Returns boolean
Reverse the last action which performed by the user in the Image Editor.
Returns void
To refresh the Canvas Wrapper.
Returns void
This method is used to update the existing redacts by changing its height, width, blur, and pixel size in the component. Use ‘getRedacts’ method to get the redacts which is then passed to change the options of a redacts.
Parameter | Type | Description |
---|---|---|
setting | RedactSettings |
Specifies the redact settings to be updated for the shape on an image. |
isSelected (optional) | boolean |
Specifies to show the redacts in the selected state. |
Returns boolean
This method is used to update the existing shapes by changing its height, width, color, and font styles in the component. Use ‘getShapeSettings’ method to get the shape which is then passed to change the options of a shape.
Parameter | Type | Description |
---|---|---|
setting | ShapeSettings |
Specifies the shape settings to be updated for the shape on an image. |
isSelected (optional) | boolean |
Specifies to show the shape in the selected state. |
Returns boolean
Zoom in or out on a point in the image editor.
Parameter | Type | Description |
---|---|---|
zoomFactor | number |
The percentage-based zoom factor to use (e.g. 20 for 2x zoom). |
zoomPoint (optional) | Point |
The point in the image editor to zoom in/out on. |
Returns void
Dynamically injects the required modules to the component.
Parameter | Type | Description |
---|---|---|
moduleList | Function[] |
? |
Returns void
Event callback that is raised before an image is saved.
EmitType<ImageEditorClickEventArgs>
Event callback that is raised while clicking on an image in the Image Editor.
EmitType<Event>
Event callback that is raised after rendering the Image Editor component.
Event callback that is raised while cropping an image.
EmitType<Event>
Event callback that is raised once the component is destroyed with its elements and bound events.
EmitType<EditCompleteEventArgs>
Event callback that is triggered after the completion of an editing action in the image editor. This event occurs after the image editor canvas has been updated through following actions such as cropping, drawing annotations, applying filters, fine-tuning, or other customizations.
It provides an opportunity to perform additional tasks, such as comparing the current image data with previous states or triggering further processing based on the changes.
Event callback that is raised once an image is opened in an Image Editor.
Event callback that is raised when applying fine tune to an image.
Event callback that is raised while flipping an image.
EmitType<FrameChangeEventArgs>
Event callback that is raised while applying frames on an image.
EmitType<ImageFilterEventArgs>
Event callback that is raised when applying filter to an image.
Event callback that is raised while panning an image.
EmitType<ClickEventArgs>
Event callback that is raised once the quick access toolbar item is clicked.
EmitType<QuickAccessToolbarEventArgs>
Event callback that is raised when opening the quick access toolbar.
Event callback that is raised while resizing an image.
Event callback that is raised while rotating an image.
Event callback that is raised once an image is saved.
EmitType<SelectionChangeEventArgs>
Event callback that is raised while changing selection in an Image Editor.
EmitType<ShapeChangeEventArgs>
Event callback that is raised after shape changing action is performed in an image editor.
EmitType<ShapeChangeEventArgs>
Event callback that is raised while changing shapes in an Image Editor.
Event callback that is raised once the toolbar is created.
EmitType<ClickEventArgs>
Event callback that is raised once the toolbar item is clicked.
Event callback that is raised while updating/refreshing the toolbar
<div style="height: 500px">
<div id='imageeditor'></div>
</div>
import { ImageEditor, ToolbarEventArgs } from '@syncfusion/ej2-image-editor';
let imageObj: ImageEditor = new ImageEditor({
showQuickAccessToolbar: true,
toolbarUpdating: (args: ToolbarEventArgs) => {
if (args.toolbarType === 'shapes') {
args.toolbarItems = ['fillColor', 'strokeColor', 'strokeWidth', { text: 'Click', template: '<button class="e-btn" id="shape">Click</button>', tooltipText: 'Click', prefixIcon: 'e-expand', id: 'Click' }];
}
},
});
imageObj.appendTo('#imageeditor');
Event callback that is raised while zooming an image.