Skip to content

Commit

Permalink
Set inline html command name via cmdInlineHtml option
Browse files Browse the repository at this point in the history
  • Loading branch information
artf committed Sep 15, 2018
1 parent 04f1eb2 commit 31f1d20
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down
2 changes: 1 addition & 1 deletion src/openExportCommand.js
Original file line number Diff line number Diff line change
Expand Up @@ -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() + `<style>${editor.getCss()}</style>`;
return juice(tmpl, opts);
Expand Down

0 comments on commit 31f1d20

Please sign in to comment.