GrapesJS Issues

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

545 issues found

πŸ” typescript
#3211Dec 29, 2020by alemenciones2 answers
3 reactions

How to move components

Hello dear: I want move a component to first/end in the wrapper programmatically, i think something like editor.getWrapper().add(editor.selectedComponent(), {at: 0});, but this's adding a new clone from selectedComponent, maybe with trigger "sorter:drag:end" at position?? can you help me? sorry for my poor english :')

artf

Probably it makes sense to add a new component.move(desComponent, opts) method to cover such a case, but for now you can achieve it in this way:

GJSBlock

Thanks for reporting this, @alemenciones. Great question about how to move components. The recommended approach with ProseMirror is to use the event-driven API. Start here: Check the GrapesJS documentation for your specific module Look for...

#3209Dec 24, 2020by TouficNouwayhedd2 answers
1 reactions

When in preview mode, the toolbar is only being hidden but still clickable

Version: 0.16.22 Are you able to reproduce the bug from the demo? Yes What is the expected behavior? When the use presses the preview button, the icon toolbar must no be clickable. Describe the bug detailed When the user presses preview (even in the demo website), if you hover over the selected component before pressi...

artf

Fix ready for the next release

GJSBlock

Thanks for reporting this, @TouficNouwayhedd. The issue with When in preview mode, the toolbar is only being hidden but still clickable appears to be a race condition or state management timing problem. This typically happens when componen...

#3207Dec 23, 2020by shkhalid4 answers
1 reactions

Form is not submitting

I am trying to create as custom block. But the form is not submitting when i use components inside content. I am able to get all the form data when i use content instead of component. But then it's not allowing me drag new inputs to form.

gixid192

The important part - the html is missing. If you can, you should share the code in codesandbox or similar online editors.

artf

Yeah, we need the complete code to understand the issue. Anyway, if you're using script please define a Custom Component instead of placing it directly in the Block, or you'll face issues on storing. I know that this is how is illustrated...

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

#3204Dec 22, 2020by maivanchuong2 answers
0 reactions

I want save and load in asp.net mvc

WARNING READ and FOLLOW next 3 steps, then REMOVE them before posting the issueFollow CONTRIBUTING Guidelines https://github.com/artf/grapesjs/blob/master/CONTRIBUTING.mdDo a quick SEARCH first, to see if someone else didn't open the same issueAll relative statements/questions have to be filled/answered, otherwise, th...

artf

Don't be disrespectful, read, and follow the issue template...

GJSBlock

Thanks for reporting this, @maivanchuong. The issue with i want save and load in asp.net mvc appears to be a race condition or state management timing problem. This typically happens when component lifecycle events and DOM modifications ov...

#3202Dec 21, 2020by vbeskrovny2 answers
0 reactions

Help needed: save/restore gjs data block types

Hello everyone, can you please point me to the right direction?When I save the html code and css code - it gets new-line-trimmed. Is there any way to avoid any trimming?After inserting "custom code" block, saving and restoration from the remote storage it appears as either "Default" type of "text" type. How to set dat...

vbeskrovny

Solved by using json content from the StorageManager.

GJSBlock

Thanks for reporting this, @vbeskrovny. Great question about Help needed: save/restore gjs data block types. The recommended approach with StyleManager is to use the event-driven API. Start here: Check the GrapesJS documentation for your s...

#3200Dec 20, 2020by sprklinginfo3 answers
0 reactions

Help needed: Get the component that a block being dropped onto?

Hello, If I drag and drop a block on a dynamically added component, how can I get/access the component that the block is dropped onto? I set dragMode to 'absolute' (design mode) so users can freely drop a block anywhere on pages with a background image for each page. The pages are dynamically added when the editor is...

artf

Sorry mate, but here I reply only to your main questionIf I drag and drop a block on a dynamically added component, how can I get/access the component that the block is dropped onto? all other things seem too much confusing to me and hones...

inthismachine

@artf is there a way to wrap <mj-text>xxx</mj-text> inside a mj-section and mj-column if it is dropped illegally? Like if the user tried to drop it on the body. Reason is I would like to auto add a dropped text block in to a 1 column row i...

GJSBlock

Thanks for reporting this, @sprklinginfo. Great question about Help needed: Get the component that a block being dropped onto?. The recommended approach with StyleManager is to use the event-driven API. Start here: Check the GrapesJS docum...

#3194Dec 18, 2020by stljeff13 answers
0 reactions

How do I repurpose the Spectrum Color Picker?

I would like to repurpose the color picker used in GrapesJS. I have to use a color picker for some project level settings. These settings are accessible from the GrapesJS editor. I would like to leverage the existing color picker that is used for traits like font colors, etc. I've seen this post about extending a trai...

artf

Currently, the only way is to use this, not public, API. I've started working on a new UI module, to handle similar situations (ability to add/replace GrapesJS UI elements) but unfortunately, I have no idea when it'll be released, as it's...

himedlooff

is there a way to keep the color picker but configure the spectrum options? for example if i wanted to force hex colors i could pass { preferredFormat: "hex" }?

GJSBlock

Thanks for reporting this, @stljeff1. Great suggestion about How do I repurpose the Spectrum Color Picker?! While this specific feature isn't yet in the core API, there are several ways to achieve similar behavior. Using the event system:...

#3193Dec 18, 2020by jlong-crestron4 answers
0 reactions

Change of current internal object store to allow for relation mappings instead of current indexable container implementation

What are you trying to add to GrapesJS? Currently newly instantiated editor instances are added to a indexable collection where the user must manage the relationship of these editors in their implementation. Instead there should be a managed collection where the user can provide a key value which will then be mapped t...

artf

I'm not sure if I got it right, can you illustrate somehow the current behavior and your proposal?

jlong-crestron

Basically, I am looking for a change of the exposed list that aggregates the editor instances on initialization so changing editors from a list to a map with a new property on the init configuration object in the resemblance of editorInsta...

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

#3192Dec 18, 2020by niveth092 answers
0 reactions

How to make components not editable in preview mode?

I am trying to make components not editable in the preview mode. The following code isn't working. Please help me to fix it. editor; ngOnInit(){ this.editor = this.initializeEditor(); this.editor.on('load', () => this.editor.runCommand('preview')); this.editor.on('run:preview', () => { this.editor.Panels.getPanels().r...

artf

Fix your function in this way

GJSBlock

Thanks for reporting this, @niveth09. Great question about How to make components not editable in preview mode?. The recommended approach with Components is to use the event-driven API. Start here: Check the GrapesJS documentation for your...

#3186Dec 11, 2020by kuhelbeher2 answers
0 reactions

Resize with percentage

Hello, there is a bug with resizing elements when their sizes are set with percentage: You can check this issue here

artf

Not a bug, I've just never handled properly resizing with the percentage πŸ™ƒ A PR would be welcome

GJSBlock

Thanks for reporting this, @kuhelbeher. The issue with Resize with percentage appears to be a race condition or state management timing problem. This typically happens when component lifecycle events and DOM modifications overlap, creating...

Browse all topics