foundation / inky

Convert a simple HTML syntax into tables compatible with Foundation for Emails.
http://foundation.zurb.com/emails
676 stars 108 forks source link

ID tags are stripped and not replaced #73

Closed seancrater closed 1 year ago

seancrater commented 7 years ago

Why: Hubspot/Marketo use ID tags to differentiate sections and it doesn't make much sense to use Foundation for Emails/Inky if I'm going to need to inject a bunch of ID tags after running the build process sadly.

Expected Functionality: Thought my ID tags would be placed the same way classes are placed.

Actual Functionality: ID tags appear to just be dropped from HTML when Inky is rendered in both watch/build tasks.

Solution: My best guess based on what I saw in the code for Inky is that this could be added to componentFactory.js to handle it on container, row, columns and any other components.

seancrater commented 7 years ago

For my own purposes, I temporarily modified my local version of Inky to not modify the ID.

To get the ID to render in watch/build processes, I opened /lib/util/getAttrs.js and removed 'id' from ignoredAttributes. I'm sure there's a reason it's in there.