I probably missed it somewhere in the docs but could not find it. I'd like to a "form" block inside a "column" block on page load fromElement and also when clearing the canvas using editor.setComponent(). With mjml I would do editor.setComponents('<mjml><mj-body><mj-container>... but what's the equivalent with the web...
artf
The recognition of the component depends on this https://github.com/artf/grapesjs/wiki/Components#component-recognition So the "form", for example, is recognized just be the tagName so you don't need to do anything else, but the "column" i...
lock[bot]
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.
Hi, I want to load an existing HTML Template into grapesjs and edit the page. Edit means:move sectionsadd/remove edit buttons, images etc. My template source will be https://html5up.net/ for example. How I can achieve this? Do I need to split my template into components? Many thanks for any answer help or suggestions....
artf
You can import it as it is but take care of this #1173
lock[bot]
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.
I want to remove the component start from the second,so i need to take the traversal. domc.getComponents() is getting everything.i just want to get something specific such as all the buttons
artf
You can use find() method at any component, so to get all button components of the canvas, you would do this
lock[bot]
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.
Hello grapesjs Team Regarding the answer given on #1153 , im posting here cause im not sure if closed issues are still visible: @artf tx for the info, i checked the provided example here https://codepen.io/artf/full/MQpZPj/ but it hides all the other elements, i would like to keep complex advance elements while add an...
artf
@ssabrewolf check better the JS code, I just rerender blocks with another collection, if you don't do it, you see them all
lock[bot]
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.
After long time I am trying again with GrapesJS. I am following the Getting Started page and I am stuck to this step https://github.com/artf/grapesjs/wiki#components In fact, I am trying to "highlight" the components with a dashed line, pressing the "eye" button, as explained in the tutorial, but it does not work. Gra...
ssabrewolf
To show the dashed lines you need to run in on editor load event editor.runCommand('sw-visibility');
endersaka
Thanks. Maybe I don't remember well but I am almost sure that it is not explained in the documentation tutorial.
artf
I think it's just because you need to indicate the height for your document
Greetings, I did searches and could not particularly find a solution to my problem. Currently, I am trying to integrate my React App with GrapeJS. import React, { Component } from 'react'; import './GrapesSrc/grapes.min.js'; import GrapesIndex from 'grapejs'; class GrapesEditor extends Component { constructor(props){...
artf
@sakshigarg9 add grapesjs via npm, then in your code just use import grapesjs from 'grapesjs' It will work, without any need to update the webpack configuration
thanhpd56
@Silavin Have you succeed with integrating grape and react?
cjpollard
If you're using webpack to build your React app, you can include it as a plugin. It'll pull it from node_modules. `plugins: [ new webpack.ProvidePlugin({ grapesjs: "grapesjs" }) ],` This worked for me.
Hi Artf there is head tag and meta tags in my head tag of HTML i am assigning to editor components. Like But it is displaying <head> content in body of iframe like
artf
GrapesJS is not designed to handle stuff outside of the body, indeed all the content are appended inside the body. So, for example, if you're creating a Page Builder you use GrapesJS for creating the template of the page NOT its metadata,...
lock[bot]
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.
Hi, I've been using grapes for about a couple of days now. Thanks for the awesome work on this project. I've read through the API docs (hopefully didn't miss this piece) and I've also tried some stuff out. Basically, I'm using grapes to load existing .hbs (handlebars) files in that the user will then be able to edit....
kaloyankostov
Just to clarify further as I now feel that my post was longer than it needed to be. I did some more digging and found #978. The issue described there is identical to mine. I basically have a custom component which has several child element...
artf
I see there are some conflicts in few points:Keep the source code of the handlebars templateHave the individual elements of the rendered handlebars template be editable in the grapes editor If you edit stuff you'd expect to get those edits...
no-response[bot]
This issue has been automatically closed because there has been no response to our request for more information from the original author. With only the information that is currently in the issue, we don't have enough information to take ac...
I have custom component and on trait change wanted to updated html but randomly it returned span/textnode in trait change function insted of html element. Below is html generated by component and on title change want to updated h4 element.linkModel.get("components").at(0) returns "div.programme-description" correctlyl...
artf
Well from what you've posted I can't tell what is happening but definitely, there is nothing generated randomly, just go deeper with the debug. BTW you can solve this easier by using find(query) method:
krunal039
@artf I tried to debug but no luck as it is happening on some pages and not on all pages. also this.find is undefined