#2504January 12, 2020by andrewryan19061 answer
Hello, I'm trying to make a simple modification to the default image asset and am running into a wall, and am sure I'm missing something simple. I need the image element to have an additional attribute that I pass into it, called mySpecialId. I can't figure out how to get the asset to render this into the DOM. I think...
artf
Put it in a plugin if you need to update also the already defined assets
#2503January 11, 2020by electrotype2 answers
I don't know if this is an issue on my side (some custom modifications) or if this is an known issue with GrapesJs: in a text zone, when I type "enter" characters, the actions and rte toolbars don't follow the bottom of the zone. I have to type some other characters for the toolbars to reposition themselves correctly:...
artf
Works as expected on my side... version of GrapesJS? Browser?
electrotype
GrapesJs 0.15.9. Tested on the latest versions of Firefox and Chrome. But I tweaked a lot of things/css... I probably broke something! Thanks for that validation it does work for you.
#2502January 11, 2020by electrotype3 answers
I'm trying to set an inital color different than black for the color picker: This doesn't work, even if color is a valid option. Is there a way to set this initial color? I'm open to solutions even if they don't use the config directly but involve some hacky code.
artf
It doesn't make sense setting a default value on it, the color picker takes the color from the selected target (probably you want to change the color on the component level)
electrotype
Well, black doesn't make sense either. I would prefere the selected color on the picker to be something else by default, when the component doesn't have any color.
artf
Try to see if changing the defaults color of the property from the Style Manager works for you. You can do it from initialization or via API
#2501January 10, 2020by senchden1 answer
Expected behaviour: After checking certain HTML5 video attributes, they persist across reloads and checkboxes reflect current state. Actual behaviour: After reloading a video for which attributes have already been set, the checkboxes display default value set. Steps to reproduce:Select HTML5 video provider.Select vide...
artf
Found the issue, it will be fixed in the next release
#2500January 9, 2020by ramusesan3 answers
am using npm : "grapesjs": "^0.15.10", and dragMode: translate added events but this is working only default drag mode, not in translate drag mode. how get I fix this
artf
Actually, we've never provided a listener for a component during the drag, but I can think about adding it in the next release (eg. component:drag:start, component:drag, component:drag:end)
artf
I see it working here https://jsfiddle.net/2gezckxL/
ramusesan
@artf no it does'nt working see the Demo below, i am not getting any console over there. am using chrome Version 79.0
#2499January 8, 2020by AbdiasM1 answer
I have a Table with say 1 row and 3 cells. When I drag and drop a Text component inside one of the cells, that cell enlarges and occupies the entire width of the table. How can I prevent that from happening and make the Text component take the width of the cell.
artf
This is how the <table> works, you should specify a fixed width to your cells to avoid it
#2498January 8, 2020by obrazkow3 answers
Bug #2478 after release still exists. Repeat steps and you will get error Uncaught TypeError: Cannot read property 'indexEl' of undefined. It can be to reproduce in your demo
artf
Nope 🤦♂️ Will be fixed in the next release. thanks @bgrand-ch
artf
Ok seems like we have also to fix the endMove function
bgrand-ch
@artf released, closed?
#2496January 7, 2020by prabha-9123 answers
Hi Folks, Steps I followed: Drag the text block. set the font color. (its in rgb/rgba format) What I Expected: Style needs to be updated as like hexa code. (like, #f0f0f0) I tried to get the particular color update using, editor.on('component:styleUpdate:color', function (model) { . But I could not get the solution. G...
artf
As the StyleManager can target Components and CssRules you have to find out first what was selected
pouyamiralayi
@prabha-912 cheers!
prabha-912
It returns undefined for me while updating the color @pouyamiralayi
#2495January 7, 2020by prabha-912No answers
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...
#2494January 7, 2020by andrewryan19063 answers
When I drag a component - say a Map - onto the canvas, it now creates three copies of that element in the DOM. However, the model is correct, and if I refresh the screen, it renders correctly. Without trying to erect an entire sandbox to reproduce, any quick thoughts on what might be causing this? Thanks, Andrew
andrewryan1906
OK, as far as I can tell the problem is in Sorter.js and centers around this code: This code is called by onMove any time you start to drag a component onto the canvas. I see that you create temporary component, and then immediately remove...
andrewryan1906
This entire problem disappears when I remove this line from my configuration init: Something about that setting causes this behavior. Still don't understand what.
artf
Thanks @andrewryan1906 for all the insights, actually the Sorter file was in my to refactor list for a while now but didn't yet find the time to handle it... Anyway I'm still confused about what is going on, for sure I need you to create a...