GrapesJS Issues

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

877 issues found

πŸ” question
#3183Dec 11, 2020by fzerman2 answers
0 reactions

How to create new custom manager?

Hi @artf, I am using and developing grapesjs for my project. I want to add new manager such that PackageManager. However, I couldn't find which object includes other managers. How can I add my custom manager to grapesjs?

fzerman

During this time, I tried to add my custom manager to grapesjs on npm. and However, I failed. This is my test code: When I build, I am taking a blank page. Please rescue me from this black hole. Thanks.

GJSBlock

Thanks for reporting this, @fzerman. Great question about QUESTION : How to create new custom manager?. The recommended approach with GrapesJS is to use the event-driven API. Start here: Check the GrapesJS documentation for your specific m...

#3181Dec 11, 2020by congweibai2 answers
0 reactions

SelectorManager not return a String but an Object

Version:0.16.30 Are you able to reproduce the bug from the demo? [1 ] Yes What is the expected behavior?* SelectorManager.getState() is supposed to return a string according to https://grapesjs.com/docs/api/selector_manager.html#getstate Describe the bug detailed What is the current behavior? SelectorManager.getState(...

congweibai

Could you have a look at https://github.com/artf/grapesjs/pull/3182 is this fix this issue? Thanks

GJSBlock

Thanks for reporting this, @congweibai. The issue with SelectorManager not return a String but an Object appears to be a race condition or state management timing problem. This typically happens when component lifecycle events and DOM modi...

#3179Dec 10, 2020by TheEightArms4 answers
1 reactions

AssetManager seems to load assets from cache and doesnt update (Question)

Hi, i've been trying to integrate Grapes for last few weeks into my VueJs project, but i got a question for the AssetManagement. thats my simple assetManager configuration, for some reason it loads another Image i uploaded two weeks ago and doesnt update, no matter what i try. If i use assetManager.add('URL'), it says...

gixid192

@TheEightArms You can set storeManager to false in init function

TheEightArms

I found out, its loading its assets from the saved code and from the database, is there a possibility to tell the StoreManager not to load assets ? Thx

artf

You can also avoid returning assets from your endpoint (where you load components and styles)

#3177Dec 9, 2020by anatoli-dp3 answers
0 reactions

QUESTION/FEATURE REQUEST: Changing Selected Component Tooltip

Is there a way through the api to change the selected component tooltip or is that something that can only be done by editing the source? If so with the api please exlain as I am not bright enough to be able to effectively change the source and every time i try to make other changes I end up with errors when using the...

artf

Hi, when you define a new component, you can customize its toolbar You can also update the toolbar at runtime in this way: but won't be stored (eg. on a refresh of the page), so I always suggest to think more in a component-oriented way.

anatoli-dp

Thanks, that is a big help to some of the things i want to add for my own use. On Tue, Dec 29, 2020 at 1:01 PM Artur Arseniev <[email protected]> wrote: Closed #3177 <https://github.com/artf/grapesjs/issues/3177>. β€” You are receivin...

GJSBlock

Thanks for reporting this, @anatoli-dp. The issue with QUESTION/FEATURE REQUEST: Changing Selected Component Tooltip appears to be a race condition or state management timing problem. This typically happens when component lifecycle events...

#3176Dec 9, 2020by mcottret4 answers
1 reactions

`setStyle` & `setComponents` options parameter not taken into account

Version: 0.16.30 Are you able to reproduce the bug from the demo? [x] Yes [ ] No Steps to reproduce:Open the consoleExecute editor.setComponents('', {avoidStore: true});Execute editor.setStyle('', {avoidStore: true});The "Stored ..." log still appears (see attached screenshot) What is the expected behavior? The option...

artf

Thanks @mcottret the fix is ready for the next release

artf

Unfortunately, due to the bad initial naming, avoidStore is intended to skip the UndoManager and not the Storage 😁 The good news, I had to introduce the new noCount option, in order to fix #3189, this will skip triggering the editor chang...

mcottret

Hello @artf ! I'm sorry to reopen this issue but the setStyle issue still seems to be present. Redoing the steps above, the "Stored ..." log still appears while calling setStyle with the noCount option. I'm seeing the fixed handleChanges h...

#3175Dec 9, 2020by mcottret2 answers
0 reactions

Selection & active RTE not cleared when component is removed programatically

Version: 0.16.30 Are you able to reproduce the bug from the demo? [x] Yes [ ] No Steps to reproduce:Select a text component in the demo's canvasThe selection box & RTE appearOpen the consoleExecute editor.setComponents('');The component is removed, but the selection box & RTE are still present (see attached screenshot...

artf

Thanks @mcottret for the report. I've handled this on my side, so it should be fixed in the next release, but as always, thanks for your willingness to help :)

GJSBlock

Thanks for reporting this, @mcottret. The issue with Selection & active RTE not cleared when component is removed programatically appears to be a race condition or state management timing problem. This typically happens when component life...

#3174Dec 9, 2020by ThetripGr2 answers
1 reactions

Creating a new component type does not inherit the functions of it's parent type

Hello, I am trying to create a new common trait shared among all components by creating the following plugin on another plugin file I am also creating a new component type same way following the docs, called extendedText which uses the text type as it's basis. While the text type has the handleBgColorChange() as shown...

ThetripGr

nvm , I revisited the docs more carefully, I somehow missed this about extending parent functions

GJSBlock

Thanks for reporting this, @ThetripGr. Great question about Creating a new component type does not inherit the functions of it's parent type. The recommended approach with Components is to use the event-driven API. Start here: Check the Gr...

#3173Dec 8, 2020by niveth094 answers
2 reactions

How to remove the eye-slash button in preview mode?

Hi @artf ! I have created a web builder using GrapesJS. I want to remove the eye-slash button in preview mode and replace it with the back button. How to do it? Kindly please help me.

robsonsobral

> I'd suggest extending the original Preview commandThank you for reply @artf . Is there any documentation or sample code about extending an existing command? https://grapesjs.com/docs/modules/Commands.html#extending

collindutter

@niveth09 here is the code for extending the preview command without the eye button:

artf

I'd suggest extending the original Preview command

#3172Dec 8, 2020by theSC0RP2 answers
0 reactions

How to track the updates of components down the tree?

Hi, @artf. I have a few questions regarding component lifecycle hooks. In my application, I want to track the updates to all the children of a component and their children, and so on. How should I do it?Updates on immediate children are tracked by the model.updated() hook but I need to track the updates to a component...

artf

I'd create a specific listener on the parent then I'd trigger that event from the child

GJSBlock

Thanks for reporting this, @theSC0RP. Great question about How to track the updates of components down the tree?. The recommended approach with Components is to use the event-driven API. Start here: Check the GrapesJS documentation for you...

#3171Dec 7, 2020by skbhagat404 answers
0 reactions

Adding / Updating href trait does not add `<a></a>` wrapper to image.

Expected Behavior - when I update href trait value, the image should be wrapped inside a with href value set. i.e. <a href="google.com"><img src="/></a> Current behavior = no change is reflected Here's code for adding trait The above function is triggered on double click, Please help me how do I add href to image dyna...

skbhagat40

It's not working, even if I do `selectedElement.getTrait('href').set({value: 'fb.com', target: '_blank'})

skbhagat40

I think the component view is not getting updated, if I repeat the action, it is rendering a tag with previous value.

skbhagat40

It works if I update href in the attributes

Browse all topics