Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remove Raw block from GrapesJS sidebar for MJML emails #13363

Open
wants to merge 14 commits into
base: 5.x
Choose a base branch
from
12 changes: 12 additions & 0 deletions plugins/GrapesJsBuilderBundle/Assets/library/js/builder.service.js
Original file line number Diff line number Diff line change
Expand Up @@ -279,6 +279,8 @@ export default class BuilderService {
content: '<mj-button href="https://">Button</mj-button>',
});

this.removeSelectedElementsEmailMjml();

return this.editor;
}

Expand Down Expand Up @@ -507,6 +509,16 @@ export default class BuilderService {
});
}

removeSelectedElementsEmailMjml() {

// Remove the RAW block (it's just not usable)
const rawblock = this.editor.BlockManager.get('mj-raw');

if (rawblock !== null) {
this.editor.BlockManager.remove(rawblock);
}
}

/**
* Generate assets list from GrapesJs
*/
Expand Down

Large diffs are not rendered by default.