Mjml: <a> link?

Created on 17 Feb 2016  路  7Comments  路  Source: mjmlio/mjml

I looked through the documentation and could not find a component for a link.

would you just put it inside the component?

would it be RAW?

I basically want a simple

<a href="google.com" target="_blank"> google </a>
Documentation

Most helpful comment

For future readers, this works pretty well

<mj-text>
  <a href="google.com" target="_blank"> google </a>
</mj-text>

All 7 comments

Hello @paOol
You can wrap any tags in <mj-text> documentation isn't really crystal clear about it

Wrapping an anchor tag in mj-text requires you to inline remove text-decoration and color inherit to match the mj-text, is this the intended use?

@g0ddish Can you open a new issue with all the details ? thanks !

@paOol we've added a notice on the documentation to clarify this !

@kvnol <a> being an HTML tag, it can only be used where HTML is supported, like inside mj-text or mj-table, but not inside components such as mj-section.

@ngarnier Yes! I Had'nt wrapping the <a> tag with the <mj-text>. Thank's a lot!

For future readers, this works pretty well

<mj-text>
  <a href="google.com" target="_blank"> google </a>
</mj-text>

Hi, I'm the future reader and thank you. I think this should be in the docs. I was looking for something like <mj-link>text link.</mj-link>.

Was this page helpful?
0 / 5 - 0 ratings