Issue #762Opened January 15, 2018by goldengrisha0 reactions

Require

Question

Please help, how can I require or import grapesjs-blocks-basic, not through <script/> tag?

Answers (3)

austinbiggsJanuary 16, 20180 reactions

@goldengrisha - Can you clarify exactly what you're trying to achieve?

goldengrishaJanuary 16, 20180 reactions

for example if I want to include this plugin I need to add tag like this <script src="path/to/grapesjs-plugin-export.min.js"></script> and then plugins: ['gjs-plugin-export'], can it be achieved by import or require ?

artfJanuary 16, 20180 reactions

You mean something like this?!?

import grapesjs from 'grapesjs';
import 'grapesjs-blocks-basic'; // <-- autoloads inside grapesjs instance

const editor = grapesjs.init({
	// ...
	plugins: ['gjs-blocks-basic'],
});

Related Questions and Answers

Continue research with similar issue discussions.

Paid Plugins That Match This Issue

Curated by issue keywords and label relevance to help you ship faster.

View all plugins

Loading paid plugin recommendations...

Browse Plugin Categories

Jump directly to plugin category pages on the marketplace.