'How to add custom option into post image editor

wordpress image editor

Hello, have any idea how to add another option in post image editor? i want to add lightbox effect to image with checkbox option, after check box i want to insert in wordpress editor something like this:

<div class="light-gallery-wrapper"><a class="lightbox" href="url/wp-content/uploads/2022/03/image.jpg" rel="lightbox"><img class="no-border alignleft wp-image-1821" src="url/wp-content/uploads/2022/03/image-500x348.jpg" alt="image caption" width="200" height="139" /></a></div>


Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source