From dcb7101712178b6be76aed327c66d70615824ba0 Mon Sep 17 00:00:00 2001 From: Artur Arseniev Date: Thu, 18 May 2017 22:25:21 +0200 Subject: [PATCH] Update mjml preset --- js/grapesjs-preset-mjml.js | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/js/grapesjs-preset-mjml.js b/js/grapesjs-preset-mjml.js index 964f576a6..ca7cc9a86 100644 --- a/js/grapesjs-preset-mjml.js +++ b/js/grapesjs-preset-mjml.js @@ -41,8 +41,9 @@ grapesjs.plugins.add('gjs-preset-mjml', (editor, opts) => { cmdm.add('clean-all', { run: function(editor, sender) { sender && sender.set('active',false); - if (confirm('Are you sure to clean the canvas?')) { - var comps = editor.DomComponents.clear(); + if (confirm('Are you sure you want to clean the canvas?')) { + editor.setComponents(''+ + 'Start from here'); localStorage.setItem('gjs-mjml-css', ''); localStorage.setItem('gjs-mjml-html', ''); } @@ -62,12 +63,12 @@ grapesjs.plugins.add('gjs-preset-mjml', (editor, opts) => { className: 'fa fa-repeat icon-redo', command: 'redo', attributes: { title: 'Redo (CTRL/CMD + SHIFT + Z)' } - }/*,{ + },{ id: 'clean-all', className: 'fa fa-trash icon-blank', command: 'clean-all', attributes: { title: 'Empty canvas' } - }*/]); + }]); // Add devices buttons var panelDevices = pnm.addPanel({id: 'devices-c'});