I want to use crop and resize images inside a bootbox. To achieve this, I use Cropper.
Based on the examples of Cropper, I should instantiate the cropper object in my bootbox when it is displayed and get rid of it when it is closed.
Is it possible or should I use a regular bootstrap modal?
Could I, for instance, add a script
tag in the bootbox message
in order to do the job there? That would be dirty, and before I commit into this, I wanted to check for more clean/elegant approaches.
My pattern for using bootbox custom dialogs is to write:
in the bootbox dialog definition and follow that up (after you create the bootbox) with
to embed my template into the bootbox dialog directly. This makes managing the contents of the bootbox much, much simpler. I haven't used cropper but assuming you can use it in a normal template then you can use the aforementioned pattern to get that template into a bootbox.