GrapesJS Issues

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

3464 issues found

#2830June 14, 2020by BerkeAras3 answers
0 reactions

[QUESTIONS]: Creating Responsive Websites

Hello, is it possible to create responsive websites? For example: A text should be smaller on mobile devices and bigger on desktop. How can I do that?

artf

Yes, you have to change the device

BerkeAras

But it does not make the website responsive. I mean, isn't it possible to just make text 15px for example on mobile and 20px on desktop?

artf

When you edit in a different view those changes are saved only for that current device

#2829June 14, 2020by gpmonch2 answers
0 reactions

"Checked" trait does not get updated

When updating a component of type checkbox which has the "checked" trait via html import, it does not update the trait input, i.e: in the grapes.js demo, import html option, add a checked="checked" attribute to the "Male" checkbox in the demo form, the result is that the checkbox on the form is checked, but it's "chec...

artf

Thanks @gpmonch for the report but it's just an issue with the webpage preset which uses an old version of forms plugin. Here you can see a working example https://jsfiddle.net/bp5e9zkc/

gpmonch

Thanks for the quick reply!

#2828June 12, 2020by kuhelbeher3 answers
0 reactions

[BUG] Problem with link and CKEditor

There is a problem with link and CKEditor. I enabled editable property for <a> tags: And when I doubleclick on the link it is editable, all works as it should. But when I finish editing and trying to edit it again I cannot do it. Can you help with this?

artf

Please create a reproducible demo

kuhelbeher

@artf Here it is: https://codesandbox.io/s/link-ckeditor-8md7v?file=/src/index.js

artf

I see how the contenteditable remains false which is the reason of the bug but I'm not sure what is the cause. It might also be the CKEditor which prevents the propagation for some reason. If someone is willing to help I'd really appreciat...

#2827June 12, 2020by AndiswamyDev1 answer
0 reactions

Couldn't make text editable after running the "editor.getSelected().view.disableEditing()" command? Any alternate command to become editable text?

Hi @artf , I'm currently working on customizing link property, So in the mid of my flow, I need to restrict the selected text to become uneditable(to get exact list of text components), by doing so , I couldn't perform further RTE actions (to unlink). I followed our previoues Grapesjs guides and docs regarding Links,...

artf

Just use the editable property (eg. editor.getSelected().set('editable', false))

#2826June 12, 2020by tonypartridge2 answers
1 reactions

Custom Select list to text component?

Hey Guys. I've seen this before but now I cannot find it for the life of me. Basically on the text component we have the top bar: https://gyazo.com/754513edcebbb0566f18e384d3eba453 How can we insert a select list here for example: Name Email Phone which inserts: {{NAME}} {{EMAIL}} {{PHONE}} It's a short code selector...

RJCAM

Hi @tonypartridge here is an example code to achieve that You can see in the documentation for more details: https://grapesjs.com/docs/api/richtexteditor.html#add

artf

@tonypartridge probably you're referring to this https://github.com/artf/grapesjs/issues/481#issuecomment-342282125

#2825June 11, 2020by Leozinho03 answers
2 reactions

How do I add my classes CSS file when using components?

I have this component: editor.BlockManager.add('rodape', { label: '3 Colunas', content: { tagName: 'div', draggable: true, attributes: { class: 'row' }, style: { 'display': 'flex', 'justify-content': 'flex-start', 'align-items': 'stretch', 'flex-wrap': 'nowrap', 'padding': '10px', }, content: 'lala' } }); I want to us...

RJCAM

Hi, @Leozinho0 You can do it like this:

RJCAM

Actually, the code I give to you works, to see what I mean, try this:Drop custom created component into canvas, as you said it won't load the css ".row" styleNow drop any column block inside the canvas, and now you see the ".row" css is lo...

Leozinho0

Hi. Thank you for answering. It doesn't work. If you check https://grapesjs.com/demo.html when you add a component (Ex.: 3 columns) and click to export the html you will see that it loads the .row and .cell classes.

#2824June 11, 2020by tonypartridge3 answers
0 reactions

Dragging items do not position on intital drag?

So when I drag a component/item from the bar to the center it will not go where I told it to go... IT always goes about 20% page width to one side? Once added it's adjustable. See this gif: https://gyazo.com/87076de55a1853e80b5dd7ea14ccb94e Does anyone have any suggestions?

RJCAM

Hi @tonypartridge Do you have the last GrapesJS version? This is working fine for me with the dragMode: "absolute", Check this basic code below:

artf

yeah... I can actually reproduce the same issue when a smaller device view is enabled, probably some kind of regression. I need time to investigate but at the moment I'm kind of busy with other stuff and dragMode is not my priority right n...

soltanloo

I have the same issue when I'm using the absolute drag mode. Blocks always fall out of the canvas and I need to scroll to grab them and place them back into the original desired position. @tonypartridge Did you figure out any way to fix th...

#2823June 11, 2020by Sameedkhan251 answer
0 reactions

i have used this method to load fonts , working fine in chrome but showing original fonts list in safari

editor.on('load', function () { styleManager = editor.StyleManager; fontProperty = styleManager.getProperty('Typography', 'font-family'); var list = []; fontProperty.set('list', list); list = [ fontProperty.addOption({value: "'Oswald', sans-serif", name: 'Oswald'}), fontProperty.addOption({value: "Helvetica Neue,Helve...

artf

check if your Safari is not showing cached contents and load the font correctly, we already discussed the same thing here https://github.com/artf/grapesjs/issues/2716

#2822June 11, 2020by Lighost2 answers
0 reactions

[BUG] SVG is not visible in editor

Hello, I have needed to put svg into my project so I used custom code component for this purpose. But when I copy svg content into component it shows nothing. But when I look at generated index the svg is visible. I have tried same thing in demo editor, but there it is not visible in editor and also at preview mode. I...

RJCAM

Hello @Lighost I think the issue is with that svg because this is the only that isn't working properly. This can have some code that are not being understood properly by the Custom Block itself. One solution is to save the svg locally and...

Lighost

@RJCAM Yes I know, I have already did this, like inserted SVG as img. But in my case I really need insert it as svg object โ€“ because I have to do some hover effects with fill attribute. In any case, somehow it has started be visible in edi...

#2821June 10, 2020by tonypartridge2 answers
0 reactions

Force assets to refresh?

Hello, When we store and load the GrapeJS it works well handling it remotely in JSON ๐Ÿ™Œ However, it loads in the existing a assets without refreshing with new ones. Whatโ€™s the best way to prevent storing assets or forcing a asset refresh?

artf

Can you post your code, 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...