I need to add some custom attributes into my compiled Foundation for Emails code:
<div class="row" customAttribute="value" customAttributeName="value" customAttributeId="value">
When I use Inky, I can write code like this:
<row class="xyz" customAttribute="value">
But it is stripped out of the final compilation. Is there a hint I can add to the code so that it is added back into the dist code?
In the latest release of Foundation for Email (2.2) this should be possible.
Referenced from here: http://zurb.com/article/1439/foundation-for-emails-2-2-what-a-ruby-gem
The background to the pull request is explained by Brandon in this discussion with a good example for adding
bgcolorattribute.in node_modules/inky/lib/componentFactory.js, towards the bottom you'll see this:
That builds the tables structure when it sees
Adding in some code to also look for the attribute bgcolor="#XXXXXX". If it finds it, it adds the value into the HTML that it outputs. If it does not find a value, it reverts to the default value from the var, which is bgcolor="". You could also put a value in there if you have a default color.
The inky markdown can then be written like so: