[Question]: Making grapesjs working with angular7 and material
Question
I'm trying to integrate the library with Angular7, but got problem when moving container <div id="gjs"></div>into the material component (stepper) in this case.
I put my code in https://stackblitz.com/edit/angular-qa6gqz (error with grapesjs doesn't happen in my local environment).
<mat-horizontal-stepper labelPosition="bottom" [@.disabled]="true">
<mat-step label="Template management" [completed]="false">
TEMPLATES
</mat-step>
<mat-step label="Edit the template" [completed]="false">
<div id="gjs"></div> <- Doesnt show
<div id="blocks"></div>
</mat-step>
<mat-step label="Test and Save" [completed]="false">
<div>
<button mat-raised-button (click)="saveTemplate()" id="save-template">
Save
</button>
</div>
</mat-step>
</mat-horizontal-stepper>
<div id="gjs"></div> <- Shows
<div id="blocks"></div>
<router-outlet></router-outlet>
Can you helkp?
Answers (2)
For future reference: Problem was related to executing the grapesjs.init call before the html was rendered and the <div> inside the mat-step was not available.
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Related Questions and Answers
Continue research with similar issue discussions.
Issue #850
[Question]: Component:Moved Event
What I'm trying to accomplish: I have a piece of code I need to run when a component is "dropped". I put "dropped" in quotes, because it ne...
Issue #860
Can't bootstrap GrapesJS + Material Design Lite integration
So i'm trying to bootstrap this integration and i think MDL framework doesn't run, because JS components are not initialized at all Here is...
Issue #1113
[QUESTIONS] New trait type is not working with rendered components?
Hello, thanks for the great framework. I'm trying to apply this to my project. I want to add a new trait for existing LINK '<a>' component....
Issue #1180
[Question] React with GrapeJS
Greetings, I did searches and could not particularly find a solution to my problem. Currently, I am trying to integrate my React App with G...
Paid Plugins That Match This Issue
Curated by issue keywords and label relevance to help you ship faster.
Loading paid plugin recommendations...
Browse Plugin Categories
Jump directly to plugin category pages on the marketplace.