FYI custom code block for grapesjs works good so far - instructions to add

In grapesjs plugin dir:

npm i grapesjs-custom-code

then
here

add

import grapesjscustomcode from 'grapesjs-custom-code';

on line 10

then in each

this.editor = grapesjs.init({

add to plugins

like
plugins: [grapesjswebpage, grapesjspostcss, grapesjsmautic, 'gjs-plugin-ckeditor',grapesjscustomcode],

Then build:
npm run build

It should be fine for all types of editors ie webpage, htmlemail and i think mjml

Works like a charm!

1 Like

Hello, thanks for the details…
I am getting this error, could you help me with it please?


Thanks a lot!

I am getting errors on “npm run build”. Can you please tell me where I should run this command? I mean in which directory?

@henryweismann it didnot work on npm run build. Where should I run it ? Thanks.