Example
<script src='https://unpkg.com/@interactivetraining/it-image-editor@latest/dist/it-image-editor.js'></script>
<it-image-editor></it-image-editor>
Example 2
<script src='https://unpkg.com/@interactivetraining/it-image-editor@latest/dist/it-image-editor.js'></script>
function addImageEditor() {
const editor = document.createElement('it-image-editor');
editor.addEventListener('save', (e) => {
console.log('save image', e.detail);
});
document.body.appendChild(editor);
}
if (document.readyState === "interactive") {
addImageEditor();
} else {
document.addEventListener('DOMContentLoaded', () => addImageEditor());
}