Hello @artf , Hope you are doing fine. I was trying to show all the blocks under different tabs. For example: displaying sections, columns under Basic tab and other items under another tab named Elements. I have gone through the issue: https://github.com/artf/grapesjs/issues/499 but didn't find any final solution or d...
artf
Hi @sunhillbd I don't know exactly what is not clear in that issue but I think all you have to know is here. With the BlockManager.render method you can control block listing, which logic/UI you'll use (select input, tabs, search, etc.) it...
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 , When I drag the section block, a plus button is displaying. After save and reloading the page, "+" button not showing. I need to show the button after page reload also. Please suggest me, how can I solve this problem? Please check the jsfiddle, similar scenario created.
noogen
@sanjib00 when you render fromElement, it's a content, not component. e.g. "\<section\>" html tag would not automatically get recognize as component because you don't have any code to recognize it as so. (hint: isComponent function or data...
artf
@sanjib00 probably you're loading incorrectly your template data https://grapesjs.com/docs/modules/Storage.html#store-and-load-templates
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 have tried this solution https://github.com/artf/grapesjs/issues/1819#event-2158016066 But on custom components Let's say, i have a mixture to two text input and a button, How do it specify attributes ngModel to both two text input?
artf
Create a custom abstract component with ngModel and then just use it when you need it
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 think there are some bugs with the form inputs It is not possible to delete a form input. When you turn off "Show borders", you can then select the input and delete, but trying that again right after, again doesn't let you delete. It also makes the inputs un-selectable. See below:
artf
Thanks for the report @kickbk this is already fixed by https://github.com/artf/grapesjs/pull/1800 and will be available in the next release
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 remove the "Drop files here or click to upload" section and also disable the (x) cross icon next tothe default images, not allowing the user to delete default images. @artf where do i change the css? I'm using the grapesjs-preset-webpage Originally posted by @sakshigarg9 in https://github.com/artf/grapesjs/i...
NicoEngler
One easy way to achieve this would be adding some CSS rules: .gjs-am-file-uploader { display: none; } .gjs-am-assets-cont { width: 100%; } And so on ... :)
sakshigarg9
Thanks worked! But I'm unable to remove the (x) icon next to the default images despite using .gjs-am-close{ display: none; }
I'm trying to apply a class on hover of a component and the class is being applied but not on hover, it applies with normal state. Please let me know if I'm looking into right feature or I misunderstood the feature. PLNKR : https://plnkr.co/edit/Est6AnnGInBa3yvhzCvm?p=preview I don't see anything in CSS or HTML itself...
NicoEngler
I have just checked and can confirm that it also works in your example. First add a class to your component, e.g. .text-blue-on-hoverNext, select the state you want to modify, e.g. hoverNow for instance change the color of the text to blue...
coder-strange
Now I get that, it works perfectly fine, I just didn't know that how it works. Thanks @NicoEngler for you this fast reply and clearing me out :)
NicoEngler
The class is applied regardless of the components state. Based on that, you can select a state, e.g. hover and style your class in that particular state. Effectively the following css will be created if you select the state hover and color...
I have two questions.Is there any way to change the built-in components name? I wanted to change the name "Box" to "Div". so the same name appears on select and on the layers/navigator panel. In simple term, if I drag and dropped a div, I need it to be named Div.Any way to add an icon in front of the text of each item...
NicoEngler
You can use data-gjs-custom-name on your components html. <h1 data-gjs-custom-name="Your Name" ...>You can use data-gjs-icon on your components html. <h1 data-gjs-icon='<i class="fa fa-arrows"></i>' ...> Please change your title to somethi...
artf
I'd add that if you rely on HTML5 drag & drop, you can use canvas:dragdata event https://grapesjs.com/docs/api/editor.html#available-events This allows you to make the editor understand "external drops", eg. by default GrapesJS can recogni...
minuwan
@NicoEngler Any other way to set default custom names for each type? If someone drag and drop content from outside, I want to display those div's names as "Divs" as well. :)
Hi, awesome job with grapesjs! I already read the docs (especially CssComposer) and also relevant issues but still, I am stuck. A custom plugin allows me to add css to a component using component.setStyle(). On reload, I need my plugin to initialize with these values. For example I want to read the margin property of...
artf
I observed that css gets added inline when using setStyle() and once the data is stored and loaded, the css is defined in classes. First of all, be sure to store your templates correctly: Store and load templates in that case, when you set...
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'd like change the labels of triats which are going to be french. Could you give a piece of example code? Thank you Artur
NicoEngler
You just need to define the label! :)
SeongwoonHong
@NicoEngler Hi Thank you for reply! but I'm trying to modify existing built in traits. i'm not trying to create custom traits..
NicoEngler
From what I have observed, you cannot define a label for the built in traits. Also the name (with uppercase(0)) is used if a label is undefined. That's why I guess your best bet is to define your traits along with proper label. Or better,...