Skip to content

Commit 8fb93f3

Browse files
committed
Fix image button in MJML editor
1 parent 4d8f3d9 commit 8fb93f3

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

assets/js/campaign-editors/mjml/index.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ export default class MjmlEditor {
2929
parent: place
3030
})
3131

32-
place.parentNode.parentNode.addEventListener("x-show-image-dialog", () => {
32+
document.getElementById("mjml-editor-toolbar").addEventListener("x-show-image-dialog", () => {
3333
document
3434
.querySelector("[data-dialog-for=image]")
3535
.dispatchEvent(new CustomEvent("x-show", { detail: {} }))

lib/keila_web/templates/campaign/_mjml_editor.html.heex

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<div id="mjml-editor-toolbar w-full" phx-update="ignore">
1+
<div id="mjml-editor-toolbar" class="w-full" phx-update="ignore">
22
<div class="wysiwyg--menu bg-white relative shadow z-10 flex overflow-x-auto mt-4">
33
<button
44
title={gettext("Insert image")}

0 commit comments

Comments
 (0)