Skip to content

Commit

Permalink
remove Raw block from MJML emails builder sidebar
Browse files Browse the repository at this point in the history
  • Loading branch information
LordRembo committed Feb 13, 2024
1 parent aa02bde commit 6908c02
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 2 deletions.
13 changes: 13 additions & 0 deletions plugins/GrapesJsBuilderBundle/Assets/library/js/builder.service.js
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,8 @@ export default class BuilderService {
content: '<mj-button href="https://">Button</mj-button>',
});

this.removeSelectedElementsEmailMjml();

return this.editor;
}

Expand Down Expand Up @@ -305,6 +307,17 @@ export default class BuilderService {
};
}
}

removeSelectedElementsEmailMjml() {

// Remove the RAW block (it's just not usable)
const rawblock = this.editor.BlockManager.get('mj-raw');

if (rawblock !== null) {
this.editor.BlockManager.remove(rawblock);
}
}

/**
* Generate assets list from GrapesJs
*/
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Large diffs are not rendered by default.

0 comments on commit 6908c02

Please sign in to comment.