GrapesJS Issues

Search parsed GitHub issues, see highlighted answers, and open the original discussion when needed.

3464 issues found

#1191June 11, 2018by ionic6662 answers
0 reactions

Is there a way to find the number of components

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.

#1190June 11, 2018by YairHadari2 answers
0 reactions

[Question] GrapesJS IndexedDB

Is there any working example or documentation implementing GrapesJS and IndexedDB except https://github.com/artf/grapesjs-indexeddb?

artf

I think the usage example is all you need to know about it

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.

#1188June 10, 2018by ssabrewolf2 answers
0 reactions

Create minimalist Panel left sidebar II

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.

#1187June 9, 2018by endersaka3 answers
0 reactions

[QUESTION]: why dashed lines do not show around components?

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

#1186June 8, 2018by Chilli-B2 answers
0 reactions

[Bug] Number trait returns 'undefined'

Hello, it's either a bug or a question, i don't know yet. I defined a new component with - beside others - a number trait, as you can see on the code below. Unfortunately when adjusting the number over the arrows coming along with the trait automatically, it very often switches to 'undefined'. Am I missing something o...

artf

For such an issue I'd require a live demo because you might be using an old version. BTW I wasn't able to reproduce it, so it might also be fixed. In case it's not, please open another issue, with a link to a live demo and exact steps on h...

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.

#1184June 8, 2018by ionic6662 answers
0 reactions

Is it possible to have only one button in the canvas

hi,bro。I want to implement that there is only one button in the canvas.when i drag the second,it will not be placed correctly or the button is disabled.

artf

You're just missing the check for the current dragged model

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.

#1183June 7, 2018by syncubecommerce3 answers
1 reactions

Grapesjs Plugins not loading second time in React SPA

Hello, I'm trying to add a grapesjs editor to my React SPA. I'm initializing editor this way: config variable has the following configuration: The first time everything is working fine. When I navigate to another page of my single page app and get back - plugins are not loaded. I tried to delete an instance of editor...

artf

editor.destroy() method is available from https://github.com/artf/grapesjs/releases/tag/v0.14.20

fernandoagarcia

I am having the a simliar issue. Except I am using VueJs. When I leave the page and comeback to it the editor runs the plugin again. This causes the editor to be unusable until I resize using the device preview but if I drag a block into t...

fernandoagarcia

@artf yup that did the job perfectly ty!

#1182June 7, 2018by ionic6662 answers
0 reactions

How do I add a custom class

hi,i can add a custom id like this I thought it was model.set('attributes', { class: 'aa')}),But it doesn't work

artf

I answered you already here #1171 use setAttributes

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.

#1181June 7, 2018by YairHadari2 answers
0 reactions

Working with big images

Hi, My end user is trying to load a very big image. When I"m working with local storage I"m reaching the local storage size limitation and when I"m working with remote I"m reaching the PHP post size limitation. Is there any built in solution to reduce the size of the image or passing data with get when saving to remot...

artf

For the local storage check this https://github.com/artf/grapesjs-indexeddb For PHP, obviously, it's up to you

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.

#1180June 7, 2018by roboman-sil3 answers
3 reactions

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