#1838February 27, 2019by NicoEngler2 answers
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.
#1837February 26, 2019by SeongwoonHong3 answers
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,...
#1836February 26, 2019by AkibDeraiya1233 answers
Hello @artf, While i am going to edit some html from editor with the help of css then i need to add !important into all the css which is changed. Let me give you an example, This is previous css Now i am going to change this font's color with #000. then only this changed css need to be append with !important, So, new...
NicoEngler
I may have found a solution for your problem. Please check https://github.com/artf/grapesjs/issues/1041#issuecomment-382545102
NicoEngler
I don't think you need to add !important because your element with the class .banner-title gets a unique class added holding the property that has changed. So if you change the color, a new class is added with color: #your-color and thus t...
AkibDeraiya123
@NicoEngler , Thank you for your valuable response. But thing is that i am loading one default template page with default css. In this css we have css like Now when i am changing the color to #000 using editor then the new css will be crea...
#1835February 26, 2019by SeongwoonHong3 answers
I'd like make 'Settings' opened at all times by default without having users to open up manually. How'd you do that? Thank you..
NicoEngler
You can pass in the property open to your sector definiton.
artf
@SeongwoonHong That settings panel it's a custom element https://github.com/artf/grapesjs/blob/6cb1199048a753a77466efd4ae8ff3752d413623/demo.html#L1409-L1430 I just append traits there, but the toggle (open/close) is actually a custom thing
SeongwoonHong
@NicoEngler Hi, Thank you but I'm not talking about sector (dimension, typografie etc). I'm talking about 'Settings'.. in other words, if i do is null..
#1834February 26, 2019by diktar2 answers
When editor is initialized with custom styling props defined for wrapper, background image is not set to wrapper. It is set correctly if editor is initialized with default configuration for wrapper. Steps to reproduce:open https://jsfiddle.net/gu289h0q/select root element in editorin Style Manager open 'Decorations' s...
artf
@diktar you have to pass all the background properties to styleable probably it's not the cleanest way to customize stuff but for now I wouldn't spend time on 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.
#1833February 26, 2019by sakshigarg93 answers
I'm using the grapesjs-preset-webpage, how do i set the intial state of the properties under Resizer?
NicoEngler
I'd like to help but could not get my head around the problem. Could you be more precise on what you are trying to accomplish?
sakshigarg9
I wish to limit resizing an image upto a specific dimension and I also want to have a specified minimum dimension. Besides that, I want to enable only br (bottom-right) point in the image for resizing. This is what my image component looks...
artf
https://github.com/artf/grapesjs/issues/1809#issuecomment-469027859 @sakshigarg9 avoid opening duplicates of your own issues, please...
#1832February 26, 2019by sakshigarg92 answers
This is my code wherein I want the logo-image to be resizable. Also, I want a div element at the other extreme end so that the user may drag and drop the logo into that container. To have that arrangement, I'm using flex display with justify-content as space-between. But with flex the background doesn't resize automat...
NicoEngler
This is most likely not a problem with grapejs but rather css. Could you set a up a demo?
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.
#1831February 25, 2019by SeongwoonHong3 answers
I'd like to do something like this. so once a user drops the test component into the canvas, I'd like to open up asset manager modal where you can upload an image by running 'open-assets' command. Thank you very much Artur
NicoEngler
To achieve this, you can listen to the drag event of the editor:
SeongwoonHong
@NicoEngler Thank you for reply! although, I'm not sure how to insert an image from image modal into the link-block component if i do this, nothing happens even after i select an image from the modal @artf Is there any way to do that? Plus...
NicoEngler
I´m afraid I can't assist further without playing around with the code myself. Though I can help debugging if you shoot up an example on codepen or similar.
#1830February 25, 2019by skateborden2 answers
When using a StyleManager property where "property" is not defined, and defaults to '', I'm seeing an error on component selection: "TypeError: values[0] is undefined" at PropertyView.js targetUpdated -> getComputedValue-> camelCase. I'm seeing this in my local project with v0.14.52. jsfiddle: https://jsfiddle.net/okc...
artf
In my case this is a sub-property of a stack, where it wouldn't make sense for a property to be defined. Yeah, it makes sense, but unfortunately, the property is kind of mandatory for the Style Manager, probably for now I'll just check the...
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.
#1829February 25, 2019by skateborden1 answer
If all devices specified for the DeviceManager have a width set, an editor breaking error occurs: "TypeError: contRules is null". I'm seeing this in my local project with v0.14.52. jsfiddle: https://jsfiddle.net/5ycmoftj/1/ I think what is happening is that CssRulesView.js render() is creating div fragments as contain...
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.