Giter Club home page Giter Club logo

mjml-campaignmonitor's Introduction

mjml-campaignmonitor for MJML

This project is intent to provide support for the Campaign Monitor custom tags on the MJML.

List of components:

  • cm-repeater
  • cm-layout
  • cm-image

Setup

yarn add mjml-campaignmonitor

Usage

<mjml>
  <mj-body>
    <cm-repeater>
      <cm-layout label="test">
        <mj-section>
          <mj-column>
            <cm-image width="100px" src="https://via.placeholder.com/100x100" />
          </mj-column>
        </mj-section>
      </cm-layout>
    </cm-repeater>
  </mj-body>
</mjml>
Documentation

All components have the same attributes as the campaign monitor document describe.

cm-image:

attribute description default value
disable-importing replace cm_dontimportimage attribute false
disable-tracking replace cm_dontconvertlink attribute false
editable replace editable attribute true
placeholder use an placeholder image false
...any other mj-image attribute

mjml-campaignmonitor's People

Contributors

wladpaiva avatar strebl avatar

Stargazers

Paul Mylecharane avatar Jonny Scholes avatar Matthew Blode avatar

Watchers

James Cloos avatar  avatar Doug Mouncey avatar

Forkers

strebl icgdoug

mjml-campaignmonitor's Issues

Fail to register component

I may be doing something wrong but I can't seem to register the components. In reading the documents I think this is the correct method for registering the component after install but I get the follow errors.

{
  "packages": [
    "mjml-campaignmonitor/lib/index.js"
  ]
}

Throws an error

Error when registering custom component :  ......./node_modules/mjml-campaignmonitor/src/index.js ......./node_modules/mjml-campaignmonitor/src/index.js:1
(function (exports, require, module, __filename, __dirname) { export Image from './Image'
                                                              ^^^^^^

SyntaxError: Unexpected token export
    at new Script (vm.js:79:7)
    at createScript (vm.js:251:10)
    at Object.runInThisContext (vm.js:303:10)
    at Module._compile (internal/modules/cjs/loader.js:656:28)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:699:10)
    at Module.load (internal/modules/cjs/loader.js:598:32)    at tryModuleLoad (internal/modules/cjs/loader.js:537:12)    at Function.Module._load (internal/modules/cjs/loader.js:529:3)    at Module.require (internal/modules/cjs/loader.js:636:17)
    at require (internal/modules/cjs/helpers.js:20:18)

Dependency issue

Getting No matching version found for mjml-validator@^4.3.1 when trying to install.

Should this be 4.3.0

Doesn't support mj-wrapper

It seems like mj-wrapper should be a valid child of cm-layout, but it doesn't work. I get the following error...

{
    line: 11,
    message: 'mj-wrapper cannot be used inside cm-layout, only inside: mj-body, mj-attributes',
    tagName: 'mj-wrapper',
    formattedMessage: 'Line 11 of /Users/keironlowe/Desktop/***/src/includes/news.mjml, included at line 28 of file /Users/keironlowe/Desktop/***/src/index.mjml (mj-wrapper) โ€” mj-wrapper cannot be used inside cm-layout, only inside: mj-body, mj-attributes'
}

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.