From 31f1d20d12f613492039cf3e52cf83714aa4d398 Mon Sep 17 00:00:00 2001 From: Artur Arseniev Date: Sat, 15 Sep 2018 10:49:12 +0200 Subject: [PATCH] Set inline html command name via `cmdInlineHtml` option --- src/index.js | 1 + src/openExportCommand.js | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/index.js b/src/index.js index 2470b65..0b235c1 100644 --- a/src/index.js +++ b/src/index.js @@ -10,6 +10,7 @@ export default grapesjs.plugins.add('gjs-preset-newsletter', (editor, opts) => { pfx: pfx || '', cmdOpenImport: 'gjs-open-import-template', cmdTglImages: 'gjs-toggle-images', + cmdInlineHtml: 'gjs-get-inlined-html', cmtTglImagesLabel: 'Toggle Images', cmdBtnMoveLabel: 'Move', cmdBtnUndoLabel: 'Undo', diff --git a/src/openExportCommand.js b/src/openExportCommand.js index 5556c63..9fc9375 100644 --- a/src/openExportCommand.js +++ b/src/openExportCommand.js @@ -14,7 +14,7 @@ define(function() { theme: opt.codeViewerTheme, }); // Set the command which could be used outside - cmdm.add(pfx + 'get-inlined-html', { + cmdm.add(opt.cmdInlineHtml, { run(editor, sender, opts = {}) { const tmpl = editor.getHtml() + ``; return juice(tmpl, opts);