UNPKG

grapesjs_codeapps

Version:

Free and Open Source Web Builder Framework/SC Modification

27 lines (23 loc) 563 B
// Specs: https://mjml.io/documentation/#mjml export default (editor, { dc, defaultModel, defaultView }) => { const type = 'mjml'; dc.addType(type, { model: defaultModel.extend( { defaults: { ...defaultModel.prototype.defaults, droppable: '[data-gjs-type=mj-head], [data-gjs-type=mj-body]', draggable: false } }, { isComponent(el) { if (el.tagName == type.toUpperCase()) { return { type }; } } } ), view: defaultView }); };