Issue #2195✓ SolvedOpened August 15, 2019by Jogai5 reactions

Define components in template

Quick answerby pouyamiralayi2

if you want to initialize the editor with some components already placed into the canvas, you need this: cheers.

Read full answer below ↓

Question

QuestionsHow can I make a part of my template a component ?How can I set draggableComponents on such a component?If so, then can I stop setting selectable: false, highlightable: false, hoverable: false on the child nodes inside said component?Is it possible to supply a different external link to the component? More explanation and a code part I have a question because I think grapesjs is smarter than I use it currently. We have an asp.net app where its integrated, and we initialize it from an element. That element is the combination of our html template and data which give our users every day...

Answers (3)

👍 Most helpfulpouyamiralayiAugust 19, 2019

if you want to initialize the editor with some components already placed into the canvas, you need this: cheers.

artfAugust 24, 2019

for the moment grapes has some issue on storing custom components defined outside plugins. Actually, are stored correctly, it's just about loading components that are not recognized because the custom type doesn't exist yet, so this is the reason for putting the code in the plugin (plugins are load...

JogaiAugust 19, 2019

Thanks for the answer and the links. They are really helpful. For this question however I was looking for a way to do this within a template. Currently we dont use the blockmanager, our users only drag stuff around. They never add anything.

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...

Free option

Check the open-source GrapesJS plugins on GitHub or run a quick search in our free catalog.

Browse free plugins →
Premium option

Premium plugins ship with support, regular updates, and production-ready features — save days of integration work.

Browse premium plugins →

Browse Plugin Categories

Jump directly to plugin category pages on the marketplace.