Use grapesjs-preset-newsletter in your project
masterThe preset can be integrated into GrapesJS using either a direct script inclusion in the browser or via modern JavaScript modules.
Browser usage
Include the GrapesJS core files and the preset script in your HTML, then initialize the editor with the plugin name.
Modern JavaScript usage
Import the plugin and pass it to the plugins array. You can provide configuration via pluginsOpts using the plugin object as the key.
import grapesjs from 'grapesjs';
import plugin from 'grapesjs-preset-newsletter';
const editor = grapesjs.init({
container : '#gjs',
// ...
plugins: [plugin],
pluginsOpts: {
[plugin]: { /* options */ }
}
// or
// plugins: [
// editor => plugin(editor, { /* options */ }),
// ],
});