GrapesJS Issues

3,464 parsed GitHub issues 370 solved · 90 open. Search, filter and explore battle-tested answers.

1,399 issues found

🔍 outdated
#1937Apr 2, 2019by Josephaberry542 answers
0 reactions

Customising close preview button and adjusting views container width

Is there a way to use a custom button for the close preview button? I can style it using css but wondered if there was something more direct in the api Also I cant find a way to set the width of the views container when using an asset manager. Cant be dragged wider by user and cant find anything in the api to do with...

artf

You can update or completely replace the preview command

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.

#1935Apr 1, 2019by Amir28282 answers
0 reactions

Adding multiple plugins together

Hello all, I have encountered a problem when trying to add 2 plugins together for example: grapesjs-preset-webpage and grapesjs-plugin-ckeditor. I downloaded both via npm, imported them and added to the plugin field at grapesjs.init. this.editor = grapesjs.init({ plugins: [ckEditorPlugin,grapesjsPreset], ... }) For so...

artf

add CKEditor library...

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.

#1934Apr 1, 2019by Nagavijay-kolla2 answers
0 reactions

How to add class to each element while rendering into web builder

I want to add a unique class to each and every element in web builder while loading or importing a template into web builder. Is there anyway to add it?

artf

Take a look at Available Events

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.

#1931Mar 28, 2019by sanjib002 answers
0 reactions

How to insert image inside the link?

Hi @artf , How can I insert image inside the link? Please share your ideas what I need to do. If I need to create any custom component, please share some code. Thanks

artf

On the demo, you should see the 'Link block' which is made for this purpose

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.

#1930Mar 28, 2019by rikoyudiansyah12 answers
0 reactions

Change 2 attributes with 1 trait

I have an input trait, I want to change the 2 attributes (name and type) on the selected input element, on canvas is appropriate, but in the final html(editor.getHtml()) it doesn't work, I've read https://grapesjs.com/docs/modules/Components.html#define-new-component but I didn't find a solution, Thank's

artf

You should change the model and not the view element this.model.setAttributes({ 'data-attr': 'value' })

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.

#1929Mar 27, 2019by sakshigarg93 answers
2 reactions

Loads asset manager, but assets not working

I'm using the pencil icon to trigger the asset manager. The triggering works fine but when I click on any of the images, no change is reflected in my image component. It shows me the existing photo even if I select a different image.

prashant2018

Click on the image you want to be replaced, in developer console write the following code snippet: You will see the selected image gets changed. The key here is target: editor.getSelected() , the selected image is treated as the target for...

artf

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.

#1928Mar 27, 2019by Ericson19913 answers
0 reactions

Change the Onclick event to Hover when select objects

Can I change the onclick event to hover when select objects and display a toolbar?

artf

You might need to extend the SelectComponent command (take a look at toggleSelectComponent method)

afdallah

@artf Is there any example on how to extend the SelectComponent?

artf

mmm not really, I hope to publish soon a general doc about Commands. BTW it's just about getting the command (https://grapesjs.com/docs/api/commands.html#get) and overwriting its method

#1927Mar 27, 2019by edward18933 answers
0 reactions

Sender.set('active') error Maximum call stack size exceeded

I have a button with the show-left command, I want to make when the button is clicked a second time (or more) remains active, but when running Sender.set ('active') in the stop function, there is a loop on stop so that an error appears Maximum call stack size exceeded First click Second click My Commands

artf

Create a reproducible demo, please

edward1893

I have 3 buttons, I want when the button is clicked for the second time (or more), the button remains active, for example, when first clicking on the layer, the layer button becomes active, if clicked again the layer button will remain act...

artf

use togglable: false instead of togglable: true

#1926Mar 27, 2019by fmr4112 answers
0 reactions

Edit Placeholder on keyup in Trait

How so that Placeholders can change when typing a word in the trait directly, current placeholders can change only when mouseover I have a trait like this, is there anything that isn't right? Thank you :

artf

I think you might need to create a new trait type for a custom behavior

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.

#1925Mar 26, 2019by alemenciones2 answers
0 reactions

ColorPicker pallete empty value problem

We have this error: "Cannot read property 'getAlpha' of null" when i set the property allowEmpty in true. Can you check this? I'm trying this: colorPicker: { allowEmpty: true }

artf

Follow the template of the issue

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.

Browse all topics