Hi there, I'm using grapes to export a custom json with all the information i need, instead of HTML and CSS. For doing that I'm parsing the gpjs-components stored on localStorage. Now iI need to customize how components are rendered inside canvas. For example I have an Input component with two traits (label and value)...
artf
I think is because adding new nodes inside the canvas, grapes cannot calculate the correct order. Correct, the order is based on components in the model, not the view. So, just to be clear, that <label> you're adding in updateComponentView...
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...
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, I want to add a new field in traits manager (components settings). This field should select an image from the assets manager and retrieve back URL link to the image)after selecting an image from assets). I just want to ask is there any smilar built-in solution in current GrapesJS version?
artf
I just want to ask is there any smilar built-in solution in current GrapesJS version? Unfortunately no, maybe one day we'll create a common module for UI elements but currently, there is no one, so you have to create a new custom trait.
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, I built a component and block that I can drag and drop in the canvas. My issue is that some styles rely on the ID. I know this might not be ideal, but it's like this at the moment. My problem is when I reload the editor with my previous values by passing it in the components prop, all my ID's are changed. Is there...
artf
@simplecommerce new release published
simplecommerce
Anyone have any idea for this issue? My issue happens when I use for example, bootstrap tabs, in order to make them work and load the right tab, it uses the ID, but since the ID is being regenerated when I load the editor with my component...
sbiwaichoon
same issue here.if i have use that id in code, id change when(id-2) reload template to grapejs (auto added "-2" to my id) , if i dont use that id in any part of my code, is fine, id wont change
Something goes crazy when the text area extend beyond a certain point. I don't know exactly how to describe it so I'm including a screen recording. To reproduce, go to https://grapesjs.com/demo-newsletter-editor.html, enter a text component that is close o the bottom of the viewport, go to the end of the text, and kee...
artf
CKEditor bug (indeed the default RTE is ok), probably related to the element being in the iframe (unfortunately a lot of text editors fails by not considering this aspect) At some point it starts highlighting other components and acting al...
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've enabled the fa fa-pencil icon into my image components, but I want it to be enabled only in specific image components, not all of them. How can I achieve that? This is my code
arthuralmeidap
You are on the right path. Yes, you have to create a new component for that but you can't override the Image component type otherwise, as you have seen, all the images will get that. What makes those images unique? How could you differenti...
sakshigarg9
I tried this and removed gjs-data-type="image" from the img tag where i want the functionality to be applied. But, neither does it implement the functionality on it and but also messes with the rest of component properties.
artf
@sakshigarg9 to prevent messes use the new addType (in your case you miss the view property and this breaks stuff in the old declaration) BTW I suggest to create a NEW component type by extending the image instead of just extending the cur...
Hi @artf , I'm trying to create a custom component and attach a JS to it. To give you a better example, think this component as a Slideshow component. For this component, I have some custom traits to allow the user to change some pre-defined configurations. The problem is happening when I attach the Js through the scr...
artf
The problem is happening when I attach the Js through the script key while I'm adding the block. The isComponent method is not being called for my new custom component. Hi Arthur, can you provide some code example of your case because I ca...
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'm trying to add multiple components which are in my canvas into the block manager but I believe because of an id issue they're not visible properly. What exactly does the id refer to? Here's my code:
WebEtSolutions
Hi, Your LinkedIn sign-in id is the same that your GooglePlus sign-in. The key of block must be unique. Bye
arthuralmeidap
The id is used internally to track each block individually. As @WebEtSolutions said you should put unique identifiers to each new block
How can I create dynamic components in block manager such that when a delete action is performed on a component it triggers the component to be placed in the block manager?
arthuralmeidap
Well, component and blocks are different concepts. If you are saying about blocks you can use the .trigger('remove') on the block that will remove it from the BlockManager
artf
@sakshigarg9 Read the documentation https://grapesjs.com/docsTry to understand what you're readingTry to solve your issues by yourselfIf you're not able to do it, then you can open an issue, by following its template, and SHOW US what you...
sakshigarg9
@artf thanks for all your patience, I'll do the same now onwards
Hi, In my javascript i already create 2 components (type "A" and type "B) with their own traits. I create a context menu on both elements to switch (in the editor) the selected element from type "A" to type "B" and change the traits in consequence. I didn't found the way to change the type of an element already insert...
arthuralmeidap
Take a look here: https://grapesjs.com/docs/modules/Traits.html#add-traits-to-components It shows how to add/remove custom traits for existing types. It may help you
MisterFK
Thanks, but i don't want to change the type but i want to change the type of only one selected element... If i change the traits of component, all the others elements with this type will be changed and it's not the purpose.
artf
I didn't found the way to change the type of an element already insert in the editor. The solution will be the same in case you would like to change a <div> with an <img>... so you remove it and replace it with another component at the sam...
Hello Grapesjs Team Ive seen the regular copy paste works as long as is made in the same page, Is it possible implement a a copy paste between 2 different pages with the editor opened Thanks in advance
japo32
This is our implementation of using localStorage in case someone needs the solution. Clipboard API would have been a great cross browser solution but it's not yet widely used.
lexoyo
I didn't try it, I just read the code You don't trigger the paste event when pasting in the body Also the css is added in a style tag after each paste... There must be a better way to handle the styles, I'll take a look soon
artf
Is it possible implement a a copy paste between 2 different pages with the editor opened Well, if for 2 different pages you mean 2 different tabs, I don't think so. Obviously, you're dealing with different editor instances so you have to f...