Issue #3282Opened February 20, 2021by ThomasPof0 reactions

BUG: CleanId function not working with MJML code

Question

CleanID is still not working for MJML code, even on latest version of grapesJS (0.16.41)

It's related to this closed issue : https://github.com/artf/grapesjs/issues/3276

      htmlOpts.attributes = (mod, attrs) => {
        const { id } = attrs;
        console.log(attrs) // this log works well with HTML dom, but not in MJML and I don't know why
        if (
          id &&
          id[0] === 'i' &&
          !mod.get('script') &&
          !mod.get('attributes').id &&
          idRules.indexOf(id) < 0
        ) {
          delete attrs.id;
        }
        return attrs;
      };

This function is not reading MJML tags : attrs are empty, and I cannot find why...

Answers (1)

artfJuly 27, 20230 reactions

The id issue should be solved already on the latest mjml plugin release

Related Questions and Answers

Continue research with similar issue discussions.

Paid Plugins That Match This Issue

Curated by issue keywords and label relevance to help you ship faster.

View all plugins

Loading paid plugin recommendations...

Browse Plugin Categories

Jump directly to plugin category pages on the marketplace.