I am trying to write a plugin to manage all the element properties of Boostrap Blocks. If someone clicks on the button it will show button related properties like button colors, size, etc... (based on default bootstrap classes) The following code - modifies the button classes and settings got stored in the model howev...
artf
You don't need to update the view in this case, just change the classes inside the model. All you need is this
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.
Im looking to create a block that when dropped will generate two components and these components would share some unique identifier between each other. If I dropped a second block to the canvas a second identifier would be used. I believe you could do this by creating your own component, but then you loose the ability...
artf
You can make use of this event
cgatian
@artf Thank you for the reply! OK I was second guessing this approach, good to get some feedback on this. Just to follow up I dont believe there's a way to detect which block was actually dropped during the event, correct?
artf
Just to follow up I dont believe there's a way to detect which block was actually dropped during the event, correct? The component it's just the first one of your list, if you wrap your 2 elements inside another div that one will be the dr...
Hi Artf Actually there is no issue. we are using grapesjs in a different way. We are not using header and sidebars of grapesjs we are performing its functionalities buy our own triggers like undo redo preview etc. Is there any way i can add my own component panel having headings, images, Gallery, Videos, Vectors, Shap...
UmairAfzalUAT
I am working on relative and absolute both will let you know when done.
artf
Hi Umar, GrapesJS supports native HTML5 Drag&Drop, therefore you are able to drop ANY kind of draggable resources (not only from the browser) You can also extend it's capabilities by using canvas:* events, like canvas:dragdata which allows...
UmairAfzalUAT
Hi Artf, Thanks for help i got that and using drag and drop in the same way. you have done the great job (Y). BTW what about designer mode is that available?
I am using the core:canvas-clear command assigned to a button but when this is pressed, the styles setup through the CSS Composer are also being removed. Grape Version: 0.14.15 Browser: Chrome 66.0.3359.139 (Official Build) (64-bit) I have setup a script to recreate this at https://jsfiddle.net/pzacf7zg/ Reproduction...
artf
Hi @Lethrir as you can see this is the command and the behavour is totally intended. This also shows you how ridiculously the command is, so you can create your own via Commands API I'd also suggest to create blocks with their own styles,...
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 am using the toHtml and isComponent properties for a custom component to allow for custom HTML output. This appears to be working when the element is first dropped on the canvas but when the page is refreshed the element is present but does not return the custom HTML. Grape Version: 0.14.15 Browser: Chrome 66.0.3359...
artf
You should put your custom components in a plugin and it will work
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.
Morning @artf :) I'm experiencing an similar problem to this issue. I can't drop any block (text, image, etc.) inside the column block from canvas. When I try to drop it inside layers it works normally, here is a short detailed screen recording of the problem with a visible html structure. Do you have any idea how to...
FrciSmrci
Hey @artf , figured out what was going on today, but forgot to close the issue in the euphoria. ๐ The classes from GrapesJS and Bootstrap were colliding, took me some time to realise that, because it worked when trying the same in layers....
artf
Hi @FrciSmrci honestly, I don't understand what is going on and can't reproduce it with the current demo. Did you customize those blocks somehow? From which preset/plugin do you get them? Are you able to reproduce it via jsfiddle? Your gra...
artf
I was thinking that maybe it would be a good idea defaulting it to a key like gjs-. What do you think? Yeah, probably that would prevent scenarios like this ๐ฌ PRs are welcome :)
I have created a custom component for social icons.When selected this component i have two traits in setting facebook URL and show facebook , when i update the both it gets updated and is reflected in canvas but when i export i don't get the URL for facebook which is set via the traits. Below is the code attached. gra...
artf
Please keep track of your issues here, you're talking about the same case #1089
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.
Basically my use case is that I want to show a whole page - with header, menu(s) and footer - in the editor canvas, but only allow the user to edit the actual content of it. The reasoning behind this is so that the users can see the page as close as it will be to the "end product". I've been able to accomplish somethi...
artf
For the point 1 you can pass this to your init options: Point 2, what about something like a custom placeholder component which just overwrites toHtml method in the model definiton
artf
Hey @dsgh, did you manage to accomplish your task?
dsgh
@artf These past few days I've been busy working on other extensions to grapesjs that we're also needing. Thank you for your suggestions here - I'll investigate more about the showWrapper option, and I think your suggestion for point 2 is...
I am extending the 'text' component by adding a new attribute and a script. When a user types a certain character in the text component, I want the script to change the attribute in the component's model, but I'm not sure how to do that. This is my setup for modifying the text component: I have two problems: the custo...
artf
You can access nested properties like this var customAttribute = '{[ attributes.customAttribute ]}'; inside the script. You should use model's properties: and then in your script var customAttribute = '{[ customProp ]}'; One more thing, yo...
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'm using the latest build and i have the issue as described in the title. I am editing html and css separately. I have noticed that when editing the css, if i try to add a new class, not used by any of the elements in the canvas yet, after saving, that css class is removed, if instead i go and create a dummy div,...
artf
Yes, it's a normal behavior, the editor optimizes the exported code, but in the next release you'll find a new keepUnusedStyles option, which allows you to skip this optimization
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.