GrapesJS Issues

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

877 issues found

πŸ” question
#3713Aug 18, 2021by shkhalid3 answers
1 reactions

Stored components with script can not be rendered properly

I am facing some problem when try to save some components which includes some scripts and reload the page the components are not rendered properly. It's showing empty boxes. Example: When i try to save a chart component from jvas28/grapesjs-echarts and reload the page i am getting this <img width="1438" alt="Screen Sh...

shkhalid

Thanks @artf! Finally i was able to figure it out The problems was in tagVarStart and tagVarEnd. After commenting it out it starts working

artf

Hey @shkhalid thanks for the report, but on this repository, you should open reproducible issues without external plugins as it might be an issue with the plugin itself. At least for what I can tell about the core, I see no issues in Compo...

GJSBlock

Thanks for reporting this, @shkhalid. Great question about Stored components with script can not be rendered properly. The recommended approach with Components is to use the event-driven API. Start here: Check the GrapesJS documentation fo...

#3712Aug 17, 2021by aliibrahim1232 answers
0 reactions

How to know if the block manager panel is open

any one knows how to execute a function when the block manager is opened

artf

If you use the default command to show/hide blocks, you can do it via editor.Commands.isActive('open-blocks')

GJSBlock

Thanks for reporting this, @aliibrahim123. Great question about help:how to know if the block manager panel is open. The recommended approach with GrapesJS is to use the event-driven API. Start here: Check the GrapesJS documentation for yo...

#3707Aug 16, 2021by denisoed1 answer
0 reactions

Is it possible to set up the rendering of Vue components?

GrapesJs is the best page builder! :heart: Sorry, i am new to GrapesJs. Can I add support for vue components?

GJSBlock

Thanks for reporting this, @denisoed. Great suggestion about is it possible to set up the rendering of Vue components?! While this specific feature isn't yet in the core API, there are several ways to achieve similar behavior. Using the ev...

#3704Aug 13, 2021by throne19864 answers
4 reactions

Load blocks closed by default?

I am using the following bit of code to collapse all the block categories, unfortunately, this is not working live demo : https://jsfiddle.net/d4702yoh/2/ What is wrong here?

artf

That should be enough editor.Blocks.getCategories().forEach(ct => ct.set('open', false)) but categories are not created until the render of blocks (which happens, by default, when you click the Blocks tab) so you just need to execute that...

ronaldohoch

Hello, i have made it to close all blocks in one plugin, try to adapt to you.:

throne1986

still the same here jsfidle : https://jsfiddle.net/46mfqeht/

#3703Aug 13, 2021by anatoli-dp2 answers
0 reactions

Custom ids have a \3 injected into the css and a space after the following letter after the \3 when added to the canvas

WARNING READ and FOLLOW next 3 steps, then REMOVE them before posting the issueFollow CONTRIBUTING Guidelines https://github.com/artf/grapesjs/blob/master/CONTRIBUTING.mdDo a quick SEARCH first, to see if someone else didn't open the same issueAll relative statements/questions have to be filled/answered, otherwise, th...

anatoli-dp

please note this issue is bad . . . now that i see it i feel stupid . . . ids cant start with a number and i didnt take that into account when making this

GJSBlock

Thanks for reporting this, @anatoli-dp. The issue with custom ids have a \3 injected into the css and a space after the following letter after the \3 when added to the canvas appears to be a race condition or state management timing proble...

#3702Aug 13, 2021by throne19861 answer
0 reactions

HTML head tags not added to the dom

I am using [grapesjs library][1] for building web pages, I have added a custom block as per docs [here][1] when I drag the block to canvas HTML data is added but <head></head> tag is empty, Here is my code function tempOnePlugin(editor) { editor.BlockManager.add('my-first-block', { label: '<i class="fa fa-clone"></i>'...

GJSBlock

Thanks for reporting this, @throne1986. Great question about HTML head tags not added to the dom. The recommended approach with ProseMirror is to use the event-driven API. Start here: Check the GrapesJS documentation for your specific modu...

#3700Aug 12, 2021by anatoli-dp3 answers
3 reactions

Setting draggable: 'wrapper' does not drop in wrapper

WARNING READ and FOLLOW next 3 steps, then REMOVE them before posting the issueFollow CONTRIBUTING Guidelines https://github.com/artf/grapesjs/blob/master/CONTRIBUTING.mdDo a quick SEARCH first, to see if someone else didn't open the same issueAll relative statements/questions have to be filled/answered, otherwise, th...

artf

The string here is supposed to be a query string so it tries to query a wrapper tag, which obviously doesn't exist. The editor attaches data-gjs-type attribute to all components in the frame, so the query you can use is draggable: '[data-g...

anatoli-dp

ah that makes a lot more sense now . . . thanks, that solved the issue

GJSBlock

Thanks for reporting this, @anatoli-dp. The issue with setting draggable: 'wrapper' does not drop in wrapper appears to be a race condition or state management timing problem. This typically happens when component lifecycle events and DOM...

#3694Aug 11, 2021by codingmachine161 answer
0 reactions

Dynamic Changes vanish when load from DB

@artf Here is my code , I am adding test in a div on select change init() { this.listenTo(this, "change:noOfLinks", this.getInfoLinks); }, getInfoLinks() { let canvasDoc = editor.Canvas.getDocument(); canvasDoc.getElementById("infoLinks").innerHTML = " test text "; editor.trigger("change:selectedComponent"); editor.Tr...

GJSBlock

Thanks for reporting this, @codingmachine16. Great question about Question: Dynamic Changes vanish when load from DB. The recommended approach with Canvas is to use the event-driven API. Start here: Check the GrapesJS documentation for you...

#3693Aug 11, 2021by GaikwadShubham3 answers
1 reactions

AdoptStylesheet not supported in grapesJS

Version: You can get the version by typing grapesjs.version into the console 0.17.22 Are you able to reproduce the bug from the demo?[x] Yes[ ] No What is the expected behavior? Should be able to see the web component in similar fashion as it is outside the grapesJS container Describe the bug detailed Grapesjs not abl...

artf

This issue is due to how AdoptStylesheet works and it's similar to this one from lit-element. Basically, you can't share the same CSSStyleSheet across multiple documents, so you have to recreate it manually, here below is a code for custom...

vasicvuk

Is there any solution for using lit-element components 3.X with grapesJS?

GJSBlock

Thanks for reporting this, @GaikwadShubham. The issue with AdoptStylesheet not supported in grapesJS appears to be a race condition or state management timing problem. This typically happens when component lifecycle events and DOM modifica...

#3690Aug 10, 2021by throne19861 answer
0 reactions

AppendTo not working with trait manager

I have a basic example as follow HTML <div id="gjs"> <div class="traits-container"></div> <div style="padding: 25px">Hello World!!!</div> </div> <h1> Append trait manager </h1> <div class="traits-container"></div> Js const editor = grapesjs.init({ container: '#gjs', fromElement: true, height: '100%', storageManager: f...

GJSBlock

Thanks for reporting this, @throne1986. Great question about appendTo not working with trait manager. The recommended approach with StyleManager is to use the event-driven API. Start here: Check the GrapesJS documentation for your specific...

Browse all topics