As of now I have
const editor = grapesjs.init({
// Indicate where to init the editor. You can also pass an HTMLElement
container: '#gjs',
canvas: {
scripts: ['https://somelink.js', 'https://anotherlink.js]
},
});
I would like to have this link as well as some scripts which are internally added, say
function alertMe() { alert('Ninja') }
I am unable to add the above function block into the canvas scripts. Anybody have an idea?
Note: It is not possible to create separate file for these script because these are extracted during run time