Browse Source

Update mjml preset

pull/2301/head
Artur Arseniev 10 years ago
parent
commit
dcb7101712
  1. 9
      js/grapesjs-preset-mjml.js

9
js/grapesjs-preset-mjml.js

@ -41,8 +41,9 @@ grapesjs.plugins.add('gjs-preset-mjml', (editor, opts) => {
cmdm.add('clean-all', { cmdm.add('clean-all', {
run: function(editor, sender) { run: function(editor, sender) {
sender && sender.set('active',false); sender && sender.set('active',false);
if (confirm('Are you sure to clean the canvas?')) { if (confirm('Are you sure you want to clean the canvas?')) {
var comps = editor.DomComponents.clear(); editor.setComponents('<mj-container><mj-section><mj-column>'+
'<mj-text>Start from here</mj-text></mj-column></mj-section></mj-container>');
localStorage.setItem('gjs-mjml-css', ''); localStorage.setItem('gjs-mjml-css', '');
localStorage.setItem('gjs-mjml-html', ''); localStorage.setItem('gjs-mjml-html', '');
} }
@ -62,12 +63,12 @@ grapesjs.plugins.add('gjs-preset-mjml', (editor, opts) => {
className: 'fa fa-repeat icon-redo', className: 'fa fa-repeat icon-redo',
command: 'redo', command: 'redo',
attributes: { title: 'Redo (CTRL/CMD + SHIFT + Z)' } attributes: { title: 'Redo (CTRL/CMD + SHIFT + Z)' }
}/*,{ },{
id: 'clean-all', id: 'clean-all',
className: 'fa fa-trash icon-blank', className: 'fa fa-trash icon-blank',
command: 'clean-all', command: 'clean-all',
attributes: { title: 'Empty canvas' } attributes: { title: 'Empty canvas' }
}*/]); }]);
// Add devices buttons // Add devices buttons
var panelDevices = pnm.addPanel({id: 'devices-c'}); var panelDevices = pnm.addPanel({id: 'devices-c'});

Loading…
Cancel
Save