Hello @artf I having issue with a traits. When I drag and drop the block to canvas it's traits showing fine in under settings section. but when I saved and edit the in 2nd time and selected that tag in canvas that traits is now populating in setting Section. Please Please Please HELP!. `// Custom Heading Component blo...
artf
Are you defining your custom component in a plugin?
Palash-Mandal
Are you defining your custom component in a plugin? No. Just Add in init function editor = grapesjs.init({ const dc = editor.DomComponents; // Custom Heading Component blockManager.add('header', { label: 'Headings', category: 'Components',...
artf
The first rule of defining new component types is to place the code inside a plugin. From docs
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...
GJSBlock
Thanks for reporting this, @iabhiyaan. The issue with Question: How can we active trait manager (of the top right panel) when component is selected appears to be a race condition or state management timing problem. This typically happens w...
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
Well, actually the proper API would be .components('html string here') which seems to work as expected, but I'll investigate the reset thing because I'd expect to work the same way
artf
Ok seems like the backbone's reset method injects the silent option which prevents the CSS collection to render the added style, so for now, I'd prefer to avoid putting hacky conditions to remove that option and would recommend sticking wi...
GJSBlock
Thanks for reporting this, @anatoli-dp. The issue with update breaks some things with css appears to be a race condition or state management timing problem. This typically happens when component lifecycle events and DOM modifications overl...
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
Maybe put the controls in the front of the text and then offset the entire box slightly for each indent or stacked item. That way u can stack them as far as you want without issue π€· Im going to end up rolling my own solution to achieve th...
artf
Yeah, unfortunately, the default layer panel is not that scalable, we need to rethink how is rendered
artf
Yeah moving controls in front of the text sound reasonable (eg. and make them visible only when I hover the component). Anyway, being not such a common case having so much messy structure I wouldn't put a lot of priority on this problem, b...
Is there a way to re-render or refresh traits (which are customs, not built-in traits) of all the components existing whithin the canvas?
iabhiyaan
`
artf
mmm what is the point? Your custom traits should already react to component changes (if you created them properly).
GJSBlock
Thanks for reporting this, @ahmedderkaoui. Great question about Refresh/Re-render traits of all components in canvas. The recommended approach with Canvas is to use the event-driven API. Start here: Check the GrapesJS documentation for you...
I know there is a function that can rerender the view of a trait. However, I still don't know how and where to use it.
GJSBlock
Thanks for reporting this, @ahmedderkaoui. Great question about Re-render trait on selected component. The recommended approach with Components is to use the event-driven API. Start here: Check the GrapesJS documentation for your specific...
Version: 0.17.3 What is the expected behavior? The documentation says that I can configure the wrapper element via the configuration: https://github.com/artf/grapesjs/blob/0027dcd1194715eeaf4b24db878dd7ebac069cc4/src/dom_components/config/config.js#L6-L24 Describe the bug detailed I don't think that this configuration...
artf
Yeah, actually the name, by default, is managed via i18n configuration. From 0.17.* version even the wrapper option is not necessary anymore as now you should extend the wrapper component as all others (in previous versions the wrapper was...
GJSBlock
Thanks for reporting this, @anlumo. The issue with DomComponents' Config Incorrect appears to be a race condition or state management timing problem. This typically happens when component lifecycle events and DOM modifications overlap, cre...
Version: 0.17.3 What is the expected behavior? Style should be retained across multiple pages Describe the bug detailed We have use case where we save and reload the content of GrapesJS. We want to leverage Page Manager to reduce the content rendered and manage it in smaller chunks. The issue pops up when we try to lo...
artf
Hi @harsh201 styles are available across all pages, so you shouldn't use editor.setStyle (which replaces all styles with a new set) but instead something like editor.getStyle().add('...')
harsh201
Hi @artf, any help here?
GJSBlock
Thanks for reporting this, @harsh201. The issue with Style gets wiped out when inserting components in multiple page using Page Manager appears to be a race condition or state management timing problem. This typically happens when componen...
Version: "0.17.3" Are you able to reproduce the bug from the demo?[X] Yes[ ] No What is the expected behavior? After inserting link using default RTE that it is immediately available to be further edited in settings, i.e. setting the HREF and Target Describe the bug detailed After selecting text with the default RTE a...
artf
Yeah, this is how it works right now (content is parsed and transformed in components only once the editing is finished). Probably we can use an approach like this as the default behaviour for links.
artf
Updated the link creation from this release https://github.com/artf/grapesjs/releases/tag/v0.18.3
GJSBlock
Thanks for reporting this, @TheDude70. The issue with RTE insert link does not update DOM appears to be a race condition or state management timing problem. This typically happens when component lifecycle events and DOM modifications overl...
Hi I am integrating page manager into my project. But the issue I am facing is that whenever I switch between pages it loads CSS and script files given in canvas object at the time of init, again and again. It makes the switching between pages slow. Implementation: grapesjs.init({ pageManager: { pages: [ { id: 'Page-1...
chiragkataria22
@artf Can you please help?
artf
Unfortunately, switching pages creates a new iframe so, the behavior is correct. I preferred to remove previous iframes in order to keep the memory usage as low as possible. One solution might be to find a way to reuse previous iframes but...
GJSBlock
Thanks for reporting this, @chiragkataria22. Thanks for sharing your report about Switching pages calls canvas styles and scripts again and again. To help the team investigate and prioritize this: Please provide: A minimal reproducible exa...