An editor.js plugin for cropping and resizing images using Cropperjs with rotate and flip functionality.
npm install editorjs-image-crop-resizeš Rotate & Flip ā rotate images ±45° and flip horizontally or vertically.
šØ Non-destructive editing ā original image is preserved until you apply changes.
ā” Seamless Editor.js integration ā works as a tune for the Image tool.
š¼ļø Base64 save option ā cropped images are stored directly in Editor.js output data.
Install my-project with npm
``bash`
npm install editorjs-image-crop-resize
āļø Usage/Examples
`javascript
//import editorjs and its imageTool first
import CropperTune from "editorjs-image-crop-resize";
import "editorjs-image-crop-resize/dist/cropper-tune.css";
const editor = new EditorJS({
holder: "editorjs",
tools: {
image: {
class: ImageTool,
config : {
//backend image uploader logic
}
tunes: ["CropperTune"],
},
CropperTune: {
class: CropperTune
}
}
});
`
You also can load the package via cdn
`
``
Live link : https://editorjs-image-crop-resize.vercel.app/

- Fork the git repo
- Add new branch for features
- Commit the fork locally
- Make a PR
- editorjs : ^2.29.1
- cropperjs : ^1.5.13