Issue #3276Opened February 18, 2021by ThomasPof0 reactions

BUG: CleanId function not working with MJML code

Question

This issue is about MJML code but I think this is more about grapesjs than grapesjs-mjml

There is a function that remove unnecessary IDs in src/code_manager/model/HtmlGenerator.js. This function is working well on HTML tags, but not on MJML tags.

What I found is

      htmlOpts.attributes = (mod, attrs) => {
        const { id } = attrs;
        console.log(attrs) // this log will return all dom elements in HTML, not in MJML
        if ( id && id[0] === 'i' && !mod.get('script') && idRules.indexOf(id) < 0 ) {
          delete attrs.id;
        }
        return attrs;
      };

Answers (1)

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.