I have grapesjs editor with mjml plugin and I decided to mark some components as not removable to protect users from remove critical parts of email template.
Sugested way how to do this set attribute of mjml element like this:
<div data-gjs-removable="false">...</div>
But it does not work for <mjml>
and <mj-body>
tags.
Can I do this after load a template?
yes you can.
After init of editor you need to traverse ComponentDom and set componenets to not removable. Do not forget to remove button from toolbox - it will not work anyway.