JSPM

mailchimpify

0.2.0
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 23
  • Score
    100M100P100Q44247F
  • License MIT

transform your data attributes to Mailchimp's custom `mc:edit`

Package Exports

  • mailchimpify

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (mailchimpify) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

Build Status

Mailchimpify

Mailchimp's custom attributes allows anyone to add, change or remove without touching code through their design view.

When you're using React or a module that uses it as dependency (ie: react-html-email), it will error since mc:edit isn't valid. This replaces any string that includes data-mc-edit with Mailchimp's mc:edit.

Supported attributes

data-mc-edit
data-mc-hideable
data-mc-repeatable
data-mc-variant
data-mc-label

Install

npm install --save mailchimpify

Usage

var mailchimpify = require('mailchimpify');
var div = '<div data-mc-edit="content">some text</div>';

mailchimpify(div); // <div mc:edit="content">some text</div>;

License

MIT%