I'm trying to build a basic Header component that lets you select H1 to H6 with a trait. But when an option is selected, the canvas doesn't update. The change is visible in the code view, and if I move the element in the canvas with the drag tool, the tag then changes. I have been reading the API docs as well as the s...
artf
@z1lk I already added such a thing for the next release
z1lk
I'm not sure why el would be a string, but see the commit that closed the issue: https://github.com/artf/grapesjs/commit/e450cb98855d16ad819f1214350825a50e45e910 If you're using the latest Grapes version, the Component listens for a change...
artf
Yeah this is because you can't change the tag name of an existing DOM element. Probably the solution would be, on tagName change, remove and replace the node (at the same position)
Hi, I'm using the preset news-letter repo for investigating the Grapes.Js, how can I create multiple and use multiple plugins within the project? Cheers
artf
@frank-tenzing just pass them in plugins
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 @artf , We are gonna to embed this grapes editor into our portal as an Email editor. As the Email will be sent by the batch process to customers, merge tags will be implemented in order to replace the variables in the template by the actual values such as names, ages, addresses of the customers. At the moment, the...
hoainam12k
hi @frank-tenzing, I think you should do it on server side, not in the Grapes editor. For example create a manage form for merge tags and send it to Grapes with API-Rich-Text-Editor. This way you can make some merge tags are available for...
artf
we need to make the merge tags can be added from a button on the panel and then save the added tags to a config file or DB Well, this is up to you building such a thing. The user creates a tag using your New Merge Tags panel and update stu...
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 want to reload grapes editor to get specific changes, is there any method to reload grapes editor?
artf
specific changes what kind of changes?
HarshOB
like I pass codes explicitly to grapes. and I got my HTML and CSS while clicking on view code button on the header of grapes editor. but it wasn't shown to the editor. Once I refresh the page or reopen the same page I got the structure in...
artf
@HarshOB I didn't get exactly what do you mean with I pass codes explicitly to grapes but if you use correctly the Editor API you should see the canvas update, eg.
I made custom component like this way and used script as well then script is working fine but I am not able to select component. Is there any other way to write content with script?
artf
change this components: "<h1>hello 123</h1>",
HarshOB
I didn't get traits if I use script while creating a custom component. Is there any problem with traits?
artf
well, there are no traits inside your block... If you're trying instead to use a custom component you have to set the type
I'm using a trait (type=select) to change the class of a component (a "column" component, so classes representing width 1-12). After I have removed previous col-* classes and added the newly selected one (via a function triggered by the select change), the Classes section of the Style Manager still has the old class....
z1lk
Ah. The ClassTagsView (classes section of the style manager) updates the selector list on the event "change:selectedComponent" on the editor model. https://github.com/artf/grapesjs/blob/66c19dae4ff5536a34b9ea73d3614fc76752a77c/src/selector...
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.
Thanks for your component, I like it very much. I have some dinamic blocks (I have tabs and when I change tab, I add group of blocks and remove the other group of blocks. The issue is that when I remove old blocks, I can't remove their categories. If I remove their categories with js ( document.querySelectorAll('.gjs-...
artf
@kkuksin you don't need to remove blocks/categories, you should just rerender blocks. We discussed about blocks and tabs here #499
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.
sometime traits change event does not fire event on model and view and I have seen below error for that. Uncaught RangeError: Maximum call stack size exceeded. at HTMLDivElement.<anonymous> (grapes.min.js:9229) at o (grapes.min.js:8871) at i.each (grapes.min.js:9131) at i.trigger (grapes.min.js:9228) at i.o.trigger (g...
artf
@krunal039 about what event are you talking about? Can you provide at least an example of how reproduce it
krunal039
@artf below is codepen link and i have added custom component named slider. here when you drop slider to editor and than click on it and it should open trait manager and if you change Link Title or Link to Open to blank value it throws abo...
artf
I can't reproduce any error, but what I see wrong at the first look is how you update models then you don't need $(this.el), you have already this.$el