-
Notifications
You must be signed in to change notification settings - Fork 108
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
Is it possible to add custom tag / attribute ? #48
Comments
What did you have in mind outside editing the Inky JS files? What kind of tag/component were you looking to add? You can add it here: https://github.com/zurb/inky/blob/master/lib/inky.js#L14 |
But editing in inky.js I still need to edit the core file. There is way to do it correctly? If components are updated, changes will be removed. |
Hmm, I would like to know more about what you have in mind. We started a post on the topic of extending Inky. Can you expand on this here: http://foundation.zurb.com/forum/posts/39717-architecting-the-future-of-foundation-for-emails |
Well, i'll post there, but i don't know if my idea is good to put on original zurb. In my projects i've using row2 and columns2 what it does? -row2 output [columns2 here] -columns2 output What's the difference? |
👍 Looking for this as well. With the "Foundation Emails 2" platform, I'd like to quickly create custom reusable elements within my emails. For example, looking at the Material Design library: <card>
<p>This is a material-design card element.</p>
<p>Maybe it can also take a 'small' and 'large' attribute?
</card>
<button color="blue" icon="add">
Custom Button Markup
</button>
<!--
<button class="md-button md-button__blue">
<i class="icon icon__add"></i>
<span>Custom Button Markup</span>
</button>
--> |
Is it possible to copy stuff like title to the element?
gives me with the latest version
You would expect the title and target attribute on the a-tag rather than on the th-tag. How can we fix this? Thanks |
@kareljan Yes, thanks to @ClementParis016 and his PR #54 You can now do this. It will ship with 2.2 at the end of the month. |
@lukeed Hmm, The goal is to get Inky to a place where you can create your own plugins. There is an proposal like that here you can chime in on: #30 In terms of using Inky with Foundation for Emails, the goal is to keep the classes and use CSS or SCSS to create the styles so that the Framework can be used a base to extend upon. There is a place for attributes perhaps in custom components or variation. Case in point would be Bulletproof buttons. You could pass in a data attribute like |
It would be great if custom-attributes wouldn't be erased. :) |
Nevermind, it's lready possible on simple |
+1 |
It would help to know what components you are using attributes on that don't get passed over into HTML. From there we can resolve those. |
Looking at lib/componentFactory.js it appears that only a few components transfer all html attributes to their output, while most of them only pass CSS classes. I am not sure if passing all attributes to all components would raise problems, but if it doesn't then it shouldn't be difficult to allow it. |
An example of needing custom attributes would be editable button links for use in Mailchimp templates. https://templates.mailchimp.com/getting-started/template-language/ The ZIP output from Zurb Foundation can be used directly in Mailchimp as custom templates, with editable content areas and editable elements. A link must contain this custom attribute for it to be editable from the Mailchimp UI.
However, The following does not pass the custom attribute unto the inner link.
|
The same goes for Sparkpost. For example an unsubscribe link needs a custom attribute
The custom attribute will be placed on the parent th element, which in this case is not correct |
Is there an easy way to add custom tag or attribute without editing Inky's core file ?
The text was updated successfully, but these errors were encountered: