#1904March 19, 2019by sakshigarg93 answers
I'm trying to listen to the change in the 'float' property whether it was shifted to the 'left' or 'right' or 'none' in Style Manager using an event but my code doesn't seem to give the desired result. It gives style update null as the output. Desirable output would be float:right, float:left or float:none
prashant2018
You can use the "model" passed as a parameter to get the current property. After inspecting the model object I figured out we can get the style using model.attributes.style You should get the desired output by modifying your code snippet i...
prashant2018
@sakshigarg9 The approach I mentioned above is not working for some of the components, to be more precise what I observed is that the style property is giving empty string on the components which have a class defined. Your approach of usin...
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.
#1903March 19, 2019by MisterFK2 answers
Hi, There is a "404" issue when drag&drop a map into canvas since the last release. The problem is also in your demo. Do you know how to fix that plz? Thanks for help !
artf
For now, add this I'll fix it the next release
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.
#1902March 18, 2019by JoeriAben3 answers
Hey, Trying to get GrapesJs work for a project I'm currently working on. But is there a way to disable the built-in components that convert div & span into editable components (or change the isComponent so I can add a class/data flag). Because I don't want all div's & span's editable only the ones I say need to be edi...
simplecommerce
@JoeriAben did you try this? https://grapesjs.com/docs/modules/Components.html#improvement-over-addtype
artf
Create a custom text-editable component by extending the text one. Then extend the text component by setting editable to false. Now in your template use data-gjs-type="text-editable"
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.
#1901March 18, 2019by fmr4112 answers
Is it possible to change the weight of border when hover, I have searched for the ".gjs-hovered" class in the css file but did not find it, I have also tried using setStyle "editor.setStyle('.gjs-hovered{outline:"4px solid #3b97e3 !important;"}');" but still nothing has changed, Thank's
artf
You don't need to use editor.setStyle if you need to customize the UI of the editor, just include this CSS after the GrapesJS one
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.
#1900March 17, 2019by cgrio2 answers
to simulate de bug follow the steps: Click on a element in canvas Click on tab to add class click on the plus sign to add new class string click in other elements in canvas click on tab to add class "The button + is hidden" Suggestion reset the behavior of class + button everytime that some element is selected in canv...
cgrio
its a problem with css
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.
#1899March 17, 2019by prgmono20183 answers
Hi, How can I use grapesjs with react? I don't want to use the plugin- I have made some changes and I want to use the editor with react and other pages. how can I do it? Thanks you vaety much!
simplecommerce
Not sure what you mean by without plugin. But if you are talking about just the GrapesJS instance, you just need to initialize it in componentDidMount. So for example: In your render In componentDidMount Something like that, normally it sh...
artf
Nothing to add beyond what already said by @simplecommerce
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.
#1898March 16, 2019by foolsopts2 answers
Step to producedrag image-block to canvas and select background.drag icon to canvas.click on image-block and go to background style tab click on background and click image button.when modal shown click on any image (not double click) then close modal.Now look at the icon in canvas you cannot change it to another icon....
artf
You're right, weird issue, I'll check it later. I'm gonna close it as is part of the Grapedrop product and not the grapesjs core, btw thanks for the report
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.
#1897March 16, 2019by sandromattei3 answers
Hello...and sorry for my english! First of all, congratulations for this fantastic framework. I'm trying to use GrapeJS to create my own wordpress editor and I have a doubt. If in my code I use a wordpress "shortcode", how can I preview this shortcode in grapeJS but leaving the html code unchanged? thanks a lot
artf
I don't know what kind of API WordPress allows you to use for shortcodes but if it's possible I'd render them and put inside the editor as blocks
sandromattei
sorry, maybe I explained myself wrongly. I would like to insert a shortcode in the code (eg [my shortcode param1 = value1 param2 = value2 /] and render an html output instead (eg <div class = "param1" id = "param2"> </div>)
artf
Well if you need to do that on runtime you should create a custom component which on render makes an async call to Wordpress to ask to render that shortcode (again, I know nothing about WP API so I'm not sure if it's possible)
#1896March 16, 2019by kaoz703 answers
OS: Windows 10 x64 Browser: Chrome 72.0.3626.121 x64 GrapesJS: v0.14.55 Hello, I have some custom components (bootstrap tabs) in a plugin, for some reason some of the components of the plugin are not being detected by GrapesJS when loading it from the container elements, and others via dragging and dropping into the e...
artf
As you see, its type is div... this is why it never reaches the other type... look why and where that type is declared
kaoz70
Alright, that was the issue! I thought that the 'div' type was a default one set by GrapesJS. Thanks for all the help!
artf
It might be that elHasClass method?!?
#1895March 15, 2019by simplecommerce3 answers
Hi, not sure if this is a bug or not. But I noticed a weird behavior, when I drag a block that has a component that contains a script function, it seems to append it into the canvas before its being dropped. And as you drop it, it appends another time, the script. If you never drop the block and just drag over and out...
simplecommerce
So I dug around and figured that it was the updateScript method in the canvasView that was being called every time a script property is found on a component, regardless if its still being dragged or not over the canvas. I did some patching...
simplecommerce
My previous solution did not work, so I had to scrap it, so I re-opened the issue.
artf
Hi @simplecommerce if you think it's a bug, please open an issue by FOLLOWING the template and create a reproducible live demo of the issue. It's really important because as we don't have a lot of free time we risk to waste a big part of i...