GrapesJS Issues

Search parsed GitHub issues, see highlighted answers, and open the original discussion when needed.

3464 issues found

#2684March 25, 2020by imso0772 answers
0 reactions

Picture element

Hi, I would like to add a "picture" block to the editor, where we could define differnt image for different device, the base html for that would look like so: My problem is, wen it is inserted to the editor, the img component, is viisble, and moveable, even from the picture element. With that it could be cause uninten...

imso077

Hi, hi you all solve the problem of responsive images ? (We have to change images, because of the content of the image should change on smaller devices, so the focus is smaller)

artf

Learn how to create custom Components and then take a look at all the available properties on the Component (so you can tell, for example, the image not being draggable)

#2683March 25, 2020by longdoan74212 answers
0 reactions

[BUG] When cancel Colorpicker, it set wrong value for component

Are you using the latest release (older versions are NOT supported)? Yes.Are you facing the bug with your local copy of GrapesJS or with the current demo? Both of them.Steps to reproduce:Drag a component then change its background color from inputOpen color picker immediatelyThen click to outside color picker (anywher...

longdoan7421

Hi @artf, After seeing around the colorpicker, I think the problem is that the spectrum doesn't have the same value as model when user changes input. So I attempted to sync the value of spectrum and model, and it could fix the issue. Here...

longdoan7421

I found out that this bug also happen if you change the input with any value, then immediately open colorpick then cancel it by clicking outside (not canvas).

#2682March 24, 2020by FedericoPalma921 answer
0 reactions

Text element change tag after save

Hi, the block of text changes tags when reloading html after saving. in detail as soon as you insert the text block the ckeditor is initialized on the div, when entering edit the ckeditor is initialized on the p tag. This is the text block on load <div data-gjs-type="default" draggable="true" data-highlightable="1" id...

artf

With the usage of a custom RTE like CKEditor we leave all the responsibility to the third-party handle the content, so if there is something you'd like to change you have to check their documentation

#2681March 24, 2020by wemod1233 answers
2 reactions

[BUG]: destroy() method didn't fully remove events

version: latest: v-0.16.3. important: update from v-0.15.9 to v-0.16.3 while keep everything same, the error will show in console: This error show there is a errro in function getFrameOffset, near position: e.ownerDocument.defaultView.frameElement: Refer to This Code Line Checking the error stack will track to This Co...

emilsedgh

I agree that this needs to be reopened and fixed within the destroy function itself.

emilsedgh

Thank you @artf ! 🙏

artf

Thanks for the report @wemod123 Are you able to create a reproducible live demo of the issue?

#2680March 24, 2020by FedericoPalma923 answers
2 reactions

Style cleaned on loading

Hi, when I load the html with the inline style previously saved by the editor the style is removed. How can I solve my problem?

FedericoPalma92

thank you

artf

config.avoidInlineStyle is true by default, there are some rare cases where it might be useful to disable (eg. disabled in the mjml plugin to make it work properly) but for the common web pages we encourage to keep it as it is

pouyamiralayi

@picozzo92 i believe from v15.08 inline styles are not supported anymore. Cheers!

#2679March 24, 2020by LOMFM2 answers
0 reactions

[Question:] adding classname for custom DomComponent

[Question:] Hi, I have used this builder plugin in angular 7. This is very well structured and extendable. But I have some issue in define custom components this plugin. The Question is How to add Classes to custom DomComponent. I have created new video wrapper dom component. This contains iframe inside of them. I wan...

artf

Can you create a live demo with the complete code of your custom component, please?

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...

#2677March 23, 2020by verloka3 answers
5 reactions

[QUESTION] How to delete a list with devices

How to delete a list with devices?

teawithfruit

Next time you can try to use the search function... ;) #875

verloka

Next time you can try to use the search function... ;)#875 thx

teawithfruit

You have to set a custom device manager configuration in your init block. https://grapesjs.com/docs/api/device_manager.html With this snippet you can clear the list.

#2676March 21, 2020by 4URGB2 answers
1 reactions

Changing color of a text part

Hi, if i select only a part of a text to change the color it dosnt work. It change only the color for the complete text. For example. If i want to change in "this is my text", only "my text", i select it, change the color, but the new color will go to the complete text. May it is a smal thing, but its really useful at...

qtarant

Hi, I made this task integrating CKEditor, so you can change font, font style, size or color.. The best is that you can select any part of the text an customize only that specific part.

artf

To do what you ask, you should add a new action to the built-in RTE and wrap the selected text in a wrapper (eg. a <span> element) and once it's wrapped you should be able to add the style you need Using a custom RTE (like the CKEditor) ta...

#2674March 20, 2020by teawithfruit3 answers
1 reactions

[QUESTIONS] i18n content integration

Hello, I'm working on an integration of my localization system (i18n) with grapes.js. The idea is to have a data field, which will hold the i18n string. If the data attribute is set, grapes.js will take the string and make it visible in a settings field. If the settings field is altered, the data attribute is also alt...

artf

@teawithfruit if you expect something in your saved HTML page (outside of the GrapesJS editor) the only thing I see it can do is: So it does nothing, probably you're another victim of thinking that scripts inside GrapesJS editor will work...

pouyamiralayi

Hi @teawithfruit there are a couple of issues with your code: 1) you don't have access to `this as the model inside component script`: Component & Js docs 2) if your use case is to control an attribute, you don't have to provide a custom t...

teawithfruit

Thank you for the very helpful the answer! This is my updated Block/Component. Right now I've got just one more problem. The script function I've added to the component is not called in the saved html page. If I add the block to the canvas...