Skip to content

Commit 8426887

Browse files
committed
Allow adding links to images in Markdown campaigns
1 parent ae9bd05 commit 8426887

File tree

2 files changed

+22
-0
lines changed

2 files changed

+22
-0
lines changed

CHANGELOG.md

+4
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22

33
## Unreleased
44

5+
### Fixed
6+
- Markdown campaigns now allow adding links to images
7+
8+
59
## Version 0.12.6
610

711
### Fixed

lib/keila/templates/html.ex

+18
Original file line numberDiff line numberDiff line change
@@ -210,6 +210,24 @@ defmodule Keila.Templates.Html do
210210
]}
211211
end
212212

213+
defp do_apply_email_markup(
214+
{"a", a_attrs, [{"table", _, [{"tr", _, [{"td", _, [{"img", img_attrs, _}]}]}]}]}
215+
) do
216+
{"table", [{"style", "width: 100%"}],
217+
[
218+
{"tr", [{"class", "block--image"}],
219+
[
220+
{"td", [],
221+
[
222+
{"a", a_attrs,
223+
[
224+
{"img", img_attrs, []}
225+
]}
226+
]}
227+
]}
228+
]}
229+
end
230+
213231
defp do_apply_email_markup({"img", img_attrs, _}) do
214232
{"table", [{"style", "width: 100%"}],
215233
[

0 commit comments

Comments
 (0)