@ividence/mjml

1.2312.3 • Public • Published

IVIDENCE MJML component librairy

Please ask your account manager for all required settings related to your account. Use the form to contact us.

Components registration

In .mjmlconfig

{
  "packages": [
    "./node_modules/@ividence/mjml/lib/components/MjIvidence.js",
    "./node_modules/@ividence/mjml/lib/components/MjIvidenceTag.js",
    "./node_modules/@ividence/mjml/lib/components/MjIvidenceSkin.js",
    "./node_modules/@ividence/mjml/lib/components/MjIvidenceOpen.js"
  ]
}

Use the components in your MJML file

Place a mj-ividence component in mj-head to initialize the library with your account settings:

  • host
  • context-id
  • hash-macro
  • https
  • additional-macros (application/x-www-form-urlencoded)

Use mj-ividence-tag with the correct slot attribute, to display an ad slot. Use the responsive attribute if the slot is configured and abled to adapt to mobile devices.

Use mj-ividence-skin to wrap your sections and display an awesome skin adslot!

All attributes set in mj-ividence could be overridden in mj-ividence-tag and mj-ividence-skin.

Example:

<mjml>
    <mj-head>
        <mj-ividence 
                host="ipe.publisher-site.fr"
                context-id="01234567890123456789abcef"
                hash-macro="[[md5]]"
                https="true"
                additional-macros="gender=[[user-gender]]&amp;birthdate=[[user-birthdate]]&amp;zip=[[user-zipcode]]"
            />
        <mj-head>
    <mj-body>
        <mj-ividence-skin slot="0">
        
            <mj-ividence-open/>
            
            <mj-section>
                <mj-column>
                    <mj-ividence-tag responsive="true" slot="1"/>
                </mj-column>
            </mj-section>
            
            <mj-section>
                <mj-column>
                    <mj-text>Lorem Ipsum</mj-text>
                    <mj-text>Neque porro quisquam est qui dolorem ipsum quia dolor sit amet, consectetur, adipisci velit...</mj-text>
                </mj-column>
            </mj-section>
            
            <mj-section>
                <mj-column>
                    <mj-ividence-tag slot="2"/>
                </mj-column>
                <mj-column>
                    <mj-ividence-tag slot="3"/>
                </mj-column>
            </mj-section>

        </mj-ividence-skin>
    </mj-body>
</mjml>

Copyright (c) 2023 IVIDENCE

https://ividence.com/

Package Sidebar

Install

npm i @ividence/mjml

Weekly Downloads

0

Version

1.2312.3

License

ISC

Unpacked Size

44.6 kB

Total Files

17

Last publish

Collaborators

  • gferreux
  • sgodart