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