Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HTML tags like <span> can not be included in <preview> #260

Open
dabico opened this issue Mar 15, 2024 · 0 comments
Open

HTML tags like <span> can not be included in <preview> #260

dabico opened this issue Mar 15, 2024 · 0 comments

Comments

@dabico
Copy link

dabico commented Mar 15, 2024

What version of Bootstrap Email are you using?

1.4.0

How are you compiling?

Online Editor

Code example

<html lang="en" xmlns:th="http://www.thymeleaf.org">
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  </head>
  <body>
    <preview>
      <span th:text="|Task [${uuid}]: ${status}|" th:remove="tag" />
    </preview>
  </body>
</html>

Describe your issue

I want to use Bootstrap Email in tandem with Thymeleaf to send emails from a Spring-based web platform I'm making. In this particular example, I would like BSE to copy the <span> and its attributes directly into the <preview>, which after being fed to Thymeleaf will replace it with the computed inner text. As of right now, the <span> is completely missing from the computed <div>, which only contains the non-breaking space characters. At the same time, I don't think it's possible to use the th:text attribute on the raw <preview> itself, as it is not copied into the produced <div> (and even if that did work, it would probably drop all the trailing spaces added by BSE).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant