I use jquery in my project. After version 0.12.8 it does not work with jquery. Prt of my webpack.config is; When I try to drop a block it throws;ComponentsView.js:76 Uncaught TypeError: Cannot read property 'length' of undefined at child.addToCollection (ComponentsView.js:76) at child.addTo (ComponentsView.js:22) at t...
artf
Do you get the same error with all of your blocks? Even with some official one?
ateshuseyin
Right. I get the same error with all blocks defined in mjml plugin.
artf
Ok, I'd like to understand if it's something related to jquery. Are you able to reproduce it without the mjml plugin? (latest version)
All I did was import HTML, except I can't modify the text in the HTML I can't type anything or remove any text
Geczy
This is the HTML that I am using https://pastebin.com/wNseLeqh is it because text is not wrapped in <p> ?
artf
This happens because td component is not editable, so the easiest solution would be, as you already get it, to wrap it inside some other component. Otherwise, you should extend the TableCell
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 sorry to be a pain i really didn't want to open a issue ticket but i have been stuck for days trying to achieve my end goal i have made a simple plugin that adds icon support (font awsom) so i have a components.js a block.js and a main.js with some configs i have managed to get the onchange working, however i...
artf
Hi @sonnylloyd I think the problem is that you're not reflecting correctly the icon property. Try with this
sonnylloyd
Thanks @artf i have been playing with your suggestion but with no luck. again sorry for being a pain heres the updated component.js
artf
@sonnylloyd check better my code, you've changed init() inside the model which was ok in your previous code. As you see, under the ...model, you only have to change the updateIcons()
I would like to prevent users from editing the internal components of specific components. IE lets say I have an element called Drupal-Block I want to prevent the users from editing the ... html inside... bit
artf
Yeah, @MichaelKlemersson is right currently you have to set them manually on any element. Another trick would be to update all children via model But what I think would be the best it's some kind of property which propagates (suggestions f...
cmcintosh
Yes i think that the propagation idea is great. To be clear the reason im looking for this is im building out a module for Drupal 8 that will allow creating themes via the GrapeJS tool. In Drupal you have elements called Blocks, and my tho...
artf
An example you can use in the demoSelect an element (eg. some section) Execute this in console
Hi @artf, I want to define a new markup language like mjml to make design more easy and readable. I started with <error>tag as a POC. Write code below; model: import Component from 'grapesjs/src/domcomponents/model/Component'; const ComponentError = Component.extend({ defaults: { type: 'error', tagName: 'error', ...Co...
gasserol
Did you see that there is a preset from the author of this project for mjml, maybe this helps you? https://github.com/artf/grapesjs-mjml
ateshuseyin
Thanks @gasserol. I saw but I could not find the problem.
ateshuseyin
Now works on drop :) But still cannot parse from element.
Hi, I want to hide a particular element when ever we click a toolbar button commands: { defaults: [{ id: 'submenuitem', run: function(editor, senderBtn){ // I want to hide "photostack-1" element ???? ???? ???? }, }], } var domc = editor.DomComponents; domc.addType('bannergalleryportion', { model: defaultModel.extend({...
artf
You can access the element from the model
sanjeevSavitr
Thanks..
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.
Hello again @artf , i confuse about push toolbar in the element with specific class (ex: modal-trigger) the element code is : and in the /src/dom_components/model/Component.js as you can see, the element to push toolbar just in tag element, and can i push toolbar to all element inside ? Thank you and sorry for my bad...
artf
I'd say the correct way to do so is to extend initToolbar() of the Component model and put there you logic
bungambohlah
I'd say the correct way to do so is to extend of the Component model Of course, i make my custom toolbar in method and please @artf can you explain about the logic to push the toolbar in the child object? i confuse about the backbone struc...
bungambohlah
Sorry i have fixed this with my logic, thank you @artf :+1:
Please help in solving the below issue. How to call a function which is outside the component in script function of component. ex: demo.myFunction function should be called in component script, but script is not able to recognize demo variable. Where as demo.myFunction can be called in init function. grapesjs.plugins....
artf
You'll find the answer here #358
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.
@arthuralmeidap @artf @cmcintosh I am trying to edit a existing template in the database, I am unable to send the template data and id to the view I have this structure in my db : <table style="width:100%"> <tr> <th>id</th> <th>template-name</th> <th>template-data</th> </tr> <tr> <td>1</td> <td>first</td> <td>{"gjs-as...
artf
@mekamleshk we're already talking about this here #368 there is no need to create another issue with the same content, thanks
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.