There is a way to show "Component settings tab" on component click? I'm trying editor.on('component:update', function(propertyName)... but I cannot find a way to show the second tab ("Component Settings")
selcukcura
Here's a cleaner approach:
miky9585
Thank's @selcukcura
miky9585
I've solved in this way. But I'ld have a more grapesjs friendly solution editor.on('component:update', function(propertyName){ if(typeof propertyName.changed.status != 'undefined' && propertyName.changed.status == "selected"){ $('[data-ori...
Hi @artf, use the last version (npm). I have a problem when using clearStyles. When try to get CSS everything is clear and nice, but when Style is saved in the database unused rules are still there.
Im currently using PHP to upload to my MySQL database. I heard it is best to save everything as TEXT or MEDIUMTEXT. But the question is, how should I protect everything and make sure no one is uploading malicious code? I am using the custom code plugin as well so the user can add custom javascript code, but how can I...
artf
Sorry but this question is totally off topic here, try to use Stack Overflow for similar doubts
Hi! I'm integrating GrapesJS ina laravel app and so far so good. After configuring remote load and storage, I'm trying to show a notification after any store (auto or manual). Following the API documentation I got that easily: editor.on('storage:end:store', () => { showNotification() }); This works fine. Then I tried...
artf
@csb346 yes, you're right, there is no storage:success:store, the event storage:end:store is correctly called even in case of errors, but being the last called you can make use of a flag variable
How to make a checkbox input type in define new trait (https://grapesjs.com/docs/modules/Traits.html#define-new-trait-type), I have made it, and the checkbox does not appear, if I compare with Built-in trait types(checkbox) there are tags i, Thank's create elemen in define new type
artf
First of all, you have to provide a demo for such a case, and why the built-in checkbox trait type is not working for you?
no-response[bot]
This issue has been automatically closed because there has been no response to our request for more information from the original author. With only the information that is currently in the issue, we don't have enough information to take ac...
Hi! Just faced the same issue: https://github.com/artf/grapesjs/issues/1295#issuecomment-410046832 While click on one of this buttons this.getPropertiesEl().style.display="none" Unable to get property 'style' of undefined or null reference Did anyone manage to fix it?
zgeist
I have same issue How can I fix it?
senchden
I can confirm that in web page demo v0.15.8 it is not possible to set a style to an element. IE11 print out this to the console when trying to set a style via the Style Manager:
Alkotronikk
For me the issue was with ParentNode.children and I had no polyfill.
Hey guys, I am new to grapejs, but so far I really love it! Now I stumbled over a problem that I can't seem to fix or to find a solution anywhere, or I am just too stupid. I was playing around with my own named plugins and imported them into the grapejs-script. It works fine and the created blocks show up. The only pr...
artf
Can you create a reproducible demo, please? From your examples, I can even say "you don't have options in your plugins", so can't help you without a demo. Next time, if something is not working please follow the BUG issue template, not the...
untouch68
Can you create a reproducible demo, please?From your examples, I can even say "you don't have options in your plugins", so can't help you without a demo.Next time, if something is not working please follow the BUG issue template, not the Q...
artf
@untouch68 again, your examples are incomplete, can you create a reproducible demo?
Hi guys, I'm new in this so I'm sorry for my question. I'm trying to use grapesjs to edit email templates. Is it possible to have dynamic fields in the editor ? for example [first name], [last name], [email address] ..etc. so before I send the email, I will replace those dynamic fields to the real data. I need somehow...
mohammed-gaber-ramadan
yes, i will do the following : I will use the news letter plugin https://github.com/artf/grapesjs-preset-newsletter and i will use ckeditor plugin https://github.com/artf/grapesjs-plugin-ckeditor and I will add a custom drop down list cont...
alikabeer32
Can you give a short example of a mail that uses it so I can better understand what you mean by a "dynamic field"?
mohammed-gaber-ramadan
For example we have 5 dynamic fields (first name, last name, email,phone, company name) Our user will go to the page to create an email template to be used for example to welcome his clients. So he will start using the builder to design hi...
I have an existing template that is currently displaying the image in the middle of the page. Now, I want to make it link or clickable so that if the user clicks on the image it should open given href. How can do that? Currently, we have link block and inside of it, we can place an image. But, I'm asking for the rever...
miky9585
I've solved in this way: on backend script: var originalImage = editor.DomComponents.getType('image'); editor.DomComponents.addType('image', { model: originalImage.model.extend({ defaults: Object.assign({}, originalImage.model.prototype.de...
miky9585
SEO Friendly backend (added Alt attr) var originalImage = editor.DomComponents.getType('image'); editor.DomComponents.addType('image', { model: originalImage.model.extend({ defaults: Object.assign({}, originalImage.model.prototype.defaults...
artf
@chauhankiran the correct step would be to create a custom component, kind of link-image which would replace the image one. The root of this component will be the <a> element and the inner one will be the image.
WARNING READ and FOLLOW next 5 steps, then REMOVE them before posting the issueFollow CONTRIBUTING Guidelines https://github.com/artf/grapesjs/blob/master/CONTRIBUTING.mdUse the GitHub Issues EXCLUSIVELY for BUGS, FEATURE REQUESTS or QUESTIONS. Prefix the title of the issue with its context, eg. [Bug]: ....Do a quick...
khbhr
Hi artf, I would like to start by thanking you for the great work you've done. Second, I would like to know if there is a possible way to move a component with its parent(s) when dragging it from a cell to another? The reason why I am aski...
artf
Well if you need to move the entire parent it doesn't make sense to let the user moving that component, so just make it draggable: false <table> <tbody> <tr> <td> <a data-gjs-type="link" data-gjs-draggable="false" href="https://google.com/...
Deus-X
I need to revisit this old topic. I now have the same requirement. Which in my opinion is valid. @artf If I set the component to draggable: false, I simply cannot move the component, which is not a solution. The user then does not know tha...