#1817February 20, 2019by AkibDeraiya1233 answers
Hello @artf I have one block into block manager like As per above script inside the block, i want to add dynamic HTML content while this block is rendered into the UI. I know that i don't need to change DOM. But need to change using model, but i don't know how can i change it using mode by id/class. Can you please hel...
artf
No @AkibDeraiya123 if you're trying to access the model from the script it means you've totally misunderstood its concept, please read carefully here https://grapesjs.com/docs/modules/Components-js.html#basic-scripts script is for the fina...
AkibDeraiya123
Thank you for the response @artf , So, it means i can't load dynamic content into blocks while it will render into the editor? If yes then how can i? Can i replace whole block's html using this.innerHTML = 'New Html content'?
artf
Of course you can, but not via script property. You have to create a custom component and update there its model
#1816February 20, 2019by Shah-ali3 answers
Ajax call which is uploading image file in assests folder It's working fine to add an image from the local. But in another scenario, It's not working. Please have a look Drag image block Select an image Delete that image Add the same image again on same the place, "uploadFile" function is not calling It's not allowing...
artf
We have to clear the file input once the image is selected
Shah-ali
Any hint please. how to clear file input?
Shah-ali
I think, I have fixed it. In OpenAssets.js
#1815February 19, 2019by ateebahmed3 answers
I had been using editor events and I noticed that component:mount event fires multiple times when a component is dragged from blocks to canvas, you can confirm it in your JSFiddle Starter.
artf
@ateebahmed please don't open issues like this. Follow the template
ateebahmed
okay will reopen it
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.
#1814February 19, 2019by ateebahmed2 answers
I want to select my component whenever it is dragged from blocks to canvas and rendered, I have tried with registering events on component:add, component:mount and calling editor.select(component), passing the component I get from callback, but it is not properly initialize or has properties missing, like its type is...
artf
https://github.com/artf/grapesjs/issues/1813#issuecomment-466408328
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.
#1813February 19, 2019by ateebahmed3 answers
I am using editor's events to get component after some action like component:add, block:drag:stop, but in both events I can't get my component that I dragged on canvas. when I call component.is('my-component-type'), it gives false, I need to perform actions based on its type, which I can't when I get that from event's...
artf
You're doing something wrong, works as expected here https://jsfiddle.net/nfkha41p/ Next time, create a reproducible demo first, then open an issue...
ateebahmed
Actually I can't produce it with built-in components but I'm using a custom component which extends default text component, will paste the code as I could not find which property to set to get the component type, although I had set type: '...
naveen-15697
You're doing something wrong, works as expected here https://jsfiddle.net/nfkha41p/Next time, create a reproducible demo first, then open an issue... @artf Here, when I drag a first component, I get three alerts. But I need only the parent...
#1812February 19, 2019by ryancwalsh3 answers
Visit https://grapesjs.com/demo.html in Chrome IncognitoClick the "Header" elementClick Decorations > BackgroundDelete Layer 2Click Layer 1Click "x" to delete the purple background imageNotice "GET https://grapesjs.com/none 404" error in the consoleClick "Images"Try to add any other new image, and nothing works
NicoEngler
I can confirm https://grapesjs.com/none 404 at step 7 tested in Chrome 72.0.3626.119 both normal & incognito mode.
NicoEngler
@artf I can't, adding images works (both normal & incognito mode).
ryancwalsh
Update: I just tried again on Win 10 Chrome Incognito Version 72.0.3626.121 (Official Build) (64-bit) using my original steps above. This time, the console error says Failed to load resource: the server responded with a status of 404 () no...
#1811February 19, 2019by sharma-mohit-eca2 answers
Hello, I have used changesCount to resizeEditor if any change occurs to the canvas. But when I select any element in canvas like, clicking any div in canvas increases changesCount so the editor resizes it. So, I want to disable changesCount on selecting any element, it should only increase its count when some change i...
artf
No, you can't disable it
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.
#1810February 19, 2019by munanadhifa2 answers
im new about grapejs, can you help me how to import html to grapesjs? i've already make plan html and css in vscode but i dont know how to import. thankyou
artf
https://grapesjs.com/docs/getting-started.html
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.
#1809February 19, 2019by sakshigarg93 answers
If i want to limit resizing an image to only specific dimensions, how can i do that? Also is it possible to enable resizing only from the bottom right corner and disable from the other corners and points?
artf
How can I update these properties if I'm using the grapesjs-preset-webpage? You can always update a component type (but do it as a plugin)
artf
You can use this options for the resizable property of components
sakshigarg9
How can I update these properties if I'm using the grapesjs-preset-webpage?
#1808February 18, 2019by MisterFK1 answer
Hi, Can we add a canvas block? I try and the editor create always a <div> around <canvas>. Thanks !
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.