cropperjs
cropperjs copied to clipboard
How to add two crop boxes on an image and how to get their preview for each
I want to add two selections on an image, to crop from two different portions of an image and preview them simultaneously.

const selection = document.getElementsByTagName('cropper-selection');
for (let i = 0; i < selection.length; i++) {
const selectionone = selection[i];
const data = await selectionone.$toCanvas();
var imgbase64 = data.toDataURL('image/png');
console.log(imgbase64);
}
Ref this example: https://fengyuanchen.github.io/cropperjs/v2/api/cropper-selection.html#multiple