GrapesJS Issues

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

3464 issues found

#906February 28, 2018by ciotuvasile2 answers
0 reactions

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

#905February 27, 2018by konstantin550003 answers
0 reactions

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

#904February 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

#903February 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"}]

#902February 27, 2018by isaacnikon3 answers
3 reactions

[QUESTION] gjs-preset-newsletter not found

I am new to posting issues on github, i am using latest version of both GrapesJS and newsletter preset from npm i have done var grapesjs = require('grapesjs'); require('grapesjs-preset-newsletter'); and ngOnInit() { var editor = grapesjs.init({ container: '#gjs', plugins: ['gjs-preset-newsletter'], pluginsOpts: { 'gjs...

isaacnikon

Hi @artf thanks for the pointer 💃 , the above code was throwing an error nlPlugin not a function, doing this helped it run thanks a lot again 👍

artf

Hi @isaacnikon and welcome on board :) Btw grapesjs-preset-newsletter is not added in a proper way if you want to load it globally, try with this instead

absyah

@isaacnikon Hei, .default does the magic. Thanks! 👍 Also giga thanks to @artf for these awesome plugins ! ! ! 🙌

#901February 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....

#900February 26, 2018by chthomos2 answers
3 reactions

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

#899February 26, 2018by sergeysova3 answers
2 reactions

[QUESTION]: 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 ?

#898February 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?

#897February 24, 2018by konstantin550003 answers
1 reactions

How to: find some component at canvas, on event "component:add"

Hi everyone, let say i've added block <form> on canvas. When i adding next <form> (second time) , need to check: if weather this component already present on canvas, call function implodeComponents(presentedComp, recentlyAddedComp){} But, On event editor.on('component:add'... i can work only with recently added compon...

konstantin55000

Thanks for your attention. I just read the doc. And ended up with this solution: editor.on('component:add', function(currentComp) { if (currentComp.attributes.tagName == "form"){ var modelList = (domComps.getComponents()).models; var prese...

ionic666

@konstantin55000 hi ,bro ,domComps.getComponents() is getting all models,i just want to get button.how can i do it?thanks

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.