I am working on a project where i integrated grapesJs for users to build there templates, save them in database and edit these saved templates. I recently added slider plugin and now user can create templates but when edit i cause issue with javascript, I am using editor.setComponents when a user edit template and add...
sfkazmi
i got a way to fix it, I directly passed the html and css content in <div>.
sfkazmi
I got a new issue, when i pass the css in <div> to render it and html, i change the style and get it with editor.getCss(); it gets the old style that i passed into style tag in <div>
hi @artf i am using your boilerplate plugin and i want to disable hoverable property from all the elements as screenshot below yellow area appearing on hover i tried to do this const updateAll = model => { model.set({hoverable:false}); model.get('components').each(model => updateAll(model)); } updateAll(editor.DomComp...
artf
@Abhisheknanda1344463 if you see "yellow area" probably because you're using showOffsets: true in your configurations (default is false)
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.
Hi, I'm developing a plugin for charts using chart.js. In order to the generated template render the chart from a data model generated by the plugin, I need to store this model into the html tag of the component. The model used by the chart is like this: And have to be stored this way: However, I don't know how to do...
gabrigcl
I have seen there's method, I'll test this and close this issue.
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.
I'm trying to create a custom component that creates it's own view with nested HTML. I do not want this HTML to be rendered as a component so I use (using jQuery) view: defaultType.view.extend({ init: function () { $(this.el).html('<div class="container"></div>'); }, getChildrenSelector: function () { return '.contain...
artf
If you add elements via View you can't select them, only Models can be selectable Read this page https://grapesjs.com/docs/modules/Components.html you also create new types without isComponent
prestonkscott
@artf I understand how to use isComponent. I will be using fromElement: false so it's not required for how I intend to use grapes. I do not want the elements added to the view to be selected, I do however want nested components to be selec...
artf
Ok, now I got it. The getChildrenContainer should work as you expect, I'll just try to remove those pointer-events stuff and make the hover work more like the select. BTW you don't need jquery, grapesjs under the hood uses cash (which has...
Hey artf, first gratulations to this awesome project, i really enjoy using it. Second: this is NOT about running grapesjs within an angular project, its more the exact opposite: grapesjs already runs fine as a angular 6 component. What i want to do is to use other angular-components within the grapesjs canvas. On the...
artf
All custom scripts loaded via canvas.scripts are loaded BEFORE components, so if you try to mount on something obviously it doesn't work. Probably you need also make use of Component related scripts
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.
Hi, I'm studying the editor and I think I understand the difference between components and blocks. Now, I was wondering if GrapesJS offers the possibily to manage a block as an atomic entity or permits to define components as a tree with of nodes. For example, I have a block called separator that basically is a table...
artf
The main issue that I can foresee is that the source code should be importable so as it is generated by the editor and I'm not sure if the editor can distinguish the separator element from any td component of a table component used for tab...
artf
the fact that it has returned a type for this node prevents the editor from testing the inner nodes of this node for a component type? No, inner nodes will be still traversed, but you can actually prevent that with this as a return to your...
artf
Yeah, the content property could really solve my problem but I guess I have to manually keep it's value in sync (with string manipulation) with the changes made by the users to the properties and the traits of the separator component, and,...
I hosted my html content in cloud. Then trying to load the html content in the editor I found the error: "Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://localhost:3000' is therefore not allowed access. If an...
cjpollard
You're pointing your storage manager to a website. You need endpoints that can handle the requests. https://grapesjs.com/docs/modules/Storage.html#setup-remote-storage
JulyanoF
> You're pointing your storage manager to a website. You need endpoints that can handle the requests. https://grapesjs.com/docs/modules/Storage.html#setup-remote-storageI tried with below endpoints that also shows errorstorageManager: {typ...
mrajeshkrossark
You're pointing your storage manager to a website. You need endpoints that can handle the requests. https://grapesjs.com/docs/modules/Storage.html#setup-remote-storage I tried with below endpoints that also shows error storageManager: { ty...
I have problem loading stored remote content into the editor when the JSON contains non empty gjs-components My JSON data looks like this which is very basic blockquote with a sentence of text Example response when calling my remote endpoint I am able to load the content if I set gjs-components: "" and it will load th...
artf
There is actually might be a bug, can you try to return gjs-components as a string (so try to json encode your array)
artf
Thanks @iainheng, for now, keep it like this until the next release (hope to push it the next week)
iainheng
@artf Thanks for your help. 😊 It is a bug indeed. I store the gjs-components as a string and it is working now. 🎉 This is the same data store as string
Hi, I'm wondering if there is the possibility to define properties for specific components. I mean, when I select the component Image I would like that in the style manager panel the section relative to the Typography is not shown; in the same way, when I select a Table component I would like to see in the style manag...
juanj
I'm not sure if this is the optimal way of doing it but you can listen to the event component:selected and if the component selected is the one you want you can add a new sector. Then you need to listen to the event component:deselected an...
artf
Actually, you can also rely on a few Component's properties made exactly for this purpose:stylable - True if it's possible to style the component. You can also indicate an array of CSS properties which is possible to style, eg. ['color', '...
artf
@peakrams the warning is actually there but the Github's Markdown doesn't let you apply custom styles to make it more visible ¯\\\(ツ)\/¯