GrapesJS Issues

3,464 parsed GitHub issues β€” 370 solved Β· 90 open. Search, filter and explore battle-tested answers.

1,399 issues found

πŸ” outdated
#908Feb 28, 2018by sbarfurth2 answers
0 reactions

Add custom classes to panels and other editor elements

When using a UI framework that provides custom classes, it would be nice to be able to use these classes on things like panels, so you wouldn't have to rewrite the CSS. A possible syntax may be: It would also be useful to be able to do this after the fact for presets, using a setter for example. I could not find a way...

artf

You can set attributes in this way

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.

#907Feb 28, 2018by josefph3 answers
1 reactions

What things should I save in the database with remote storageManager?

What do I do with gjs-assets, gjs-components, gjs-css, gjs-html, and gjs-style? and how do I load these things to my editor?

artf

gjs-html and gjs-css are your final results, so probably you would print them on some page for the end user. gjs-components and gjs-style contains the JSON data about your template so you have to use those if you need to edit the template...

josefph

@artf would there be problems if I would just insert the saved html and css to the editor to edit it? and not use the gjs-components and gjs-style?

artf

@pranzikkin if you use custom elements and you care about the consistency with editing your templates, well yeah, you'll get problems

#906Feb 28, 2018by ciotuvasile2 answers
0 reactions

How to change custom component content (html) from ajax?

Hi @artf, First of all thanks for this awesome plugin. Can you please let me know how i can update/change block content? I created custom block + component. <table><tr><td class="some-class">texttoreplace</td></tr></table> Component has new toolbar button (search icon in attached screenshot) and on click i get new inf...

artf

The components() method is the way to go to change the inner content editor.getSelected().components('<div>New inner content</div>'); but take care that with editor.getSelected().toHTML() you're getting the outer content (with its componen...

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.

#905Feb 27, 2018by konstantin550003 answers
0 reactions

Need to find nessesary event.

Hello to all! When dragging block into canvas, and drop it: ... we have an event to detect, what block we drop in. ?: but when i drop block text, into form, (otherwords i nest one block into other) how can i detect : into what specific block nesting occurs?. What event is specified to detect such component. I've tried...

konstantin55000

If need to explaine more, about situation, please write. here i've tried to describe on video https://www.screencast.com/t/V2mGBFXp so when text dropping into form, i need event, to detect component form

artf

Hi Konstantin, first of all, canvas:* events were introduced from the https://github.com/artf/grapesjs/releases/tag/v0.13.5 by using HTML5 D&D and from your screencast seems like you're not using it. BTW what about checking the parent elem...

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.

#904Feb 27, 2018by g403 answers
1 reactions

Questions ...

First off, thank you. This is really wonderful stuff. Actually it's better than that. It is astonishingly good. Some questions right off. Possibly feature requests, not sure. The form section has the usual widgets but no 'range' option. How can I add one?More complex perhaps: is there an example of how to wrap (say) a...

g40

@artf thank you for the pointers. @tommedema yes and any help welcomed. :)

artf

The form section has the usual widgets but no 'range' option. How can I add one? You should read about BlocksMore complex perhaps: is there an example of how to wrap (say) a chart.js instance so it appears in the tool palette etc? Just lik...

tommedema

@g40 if you ever get to do this would it be open source? would like to have a peek

#903Feb 27, 2018by rajatkumcom3 answers
1 reactions

How to access "assets" like we have getHtml() and getCss().

WARNING READ and FOLLOW next 5 steps, then REMOVE them before posting the issueFollow CONTRIBUTING Guidelines https://github.com/artf/grapesjs/blob/master/CONTRIBUTING.mdUse the GitHub Issues EXCLUSIVELY for BUGS, FEATURE REQUESTS or QUESTIONS. Prefix the title of the issue with its context, eg. [Bug]: ....Do a quick...

cjpollard

Asset Manager's getAll function should do just that.

rajatkumcom

Could someone please help with following:- like we have - getHtml(), getCss(), getStyle(), getComponents(). what we have for assets.

rajatkumcom

Thanks for response. But I want to get the similar assets data which is send at the time we do editor.store(). like - [{"type":"image","src":"./img/bg-gr-v.png","unitDim":"px","height":1,"width":1728,"date":"2015-02-01"}]

#901Feb 26, 2018by rajatkumcom3 answers
0 reactions

Can we have local and remote storage at the same time.

WARNING READ and FOLLOW next 5 steps, then REMOVE them before posting the issueFollow CONTRIBUTING Guidelines https://github.com/artf/grapesjs/blob/master/CONTRIBUTING.mdUse the GitHub Issues EXCLUSIVELY for BUGS, FEATURE REQUESTS or QUESTIONS. Prefix the title of the issue with its context, eg. [Bug]: ....Do a quick...

rajatkumcom

In my case I want both local and remote storage at the same time. The data will be stored locally in localstorage( If he/she will refresh the page without saving the save button the data will be rendered from local storage ) and when user...

artf

Yeah, just leave the default localStorage active and create a button which makes use of remote storage

rajatkumcom

Thank you....

#900Feb 26, 2018by chthomos2 answers
3 reactions

Apply styles to all media queries

Again, congratulations on the great job. We have heavily extended Grapes and we managed to add almost all the functionality we need. We plan to use it for mobile first pages. So we have set up the Device manager to default to "Mobile Portrait". Styling is done through classes, and we have extended all components to cr...

chthomos

I figured out how to make it mobile first and it solves my issue for now: Set the editor config.mediaCondition: 'min-width' and on deviceManager: [ {name: 'Mobile portrait', width:'320px',widthMedia:'0px'} {name: 'Tablet', width:'568px',wi...

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.

#899Feb 26, 2018by sergeysova3 answers
2 reactions

Add button to selected element panel

How to add custom button to that panel:

chiqui3d

Check this https://github.com/artf/grapesjs/issues/266

artf

Toolbar buttons are component-specific, so you can have a different set of buttons for each element. Here you can see how the toolbar is created by default: Component.initToolbar

sergeysova

@artf ?

#898Feb 26, 2018by NorthstarTech3 answers
0 reactions

Editor.getHtml() outside the iframe of grapesjs.

How should I get the getHtml() outside the grapesjs editor. I have a save button outside the iframe of editor. I am not getting the current html when I click the save button. Help Needed.

alvim

You should get it by editor.getHtml(). If your editor is inside an iFrame and you're executing code in a parent window, you could access it like this: Is this what you're looking for?

artf

Sorry @NorthstarTech but I totally didn't get what you're talking about

JordanTGVG

I have a issue in Edge browser, i cannot get the html from the editor with: window.frames[indexOfIFrame].editor.getHtml() in chrome and mozzila is working good, any ideas?

Browse all topics