GrapesJS / grapesjs

Free and Open source Web Builder Framework. Next generation tool for building templates without coding
https://grapesjs.com
BSD 3-Clause "New" or "Revised" License
22.36k stars 4.05k forks source link

BUG: Editor Freeze on loadProjectData 0.21.7 #5457

Closed boardmain closed 11 months ago

boardmain commented 1 year ago

GrapesJS version

What browser are you using?

Chrome 117.0

Reproducible demo link

localhost

Describe the bug

grapesjs": "^0.21.7",

editor.loadProjectData({ "assets": [], "styles": [], "pages": [{ "component": "

TEST TEST TEST TEST
" }] })

editor freeze

Code of Conduct

artf commented 12 months ago

Are you able to provide a reproducible demo? Tried your example and I don't see any freeze....

boardmain commented 11 months ago

tried with the latest version 21.7 i try to put it online, but i just pasted html from a custom command, the source is pasted, but after it, the editor freeze ( i need to close the page )

for example

btnImp.onclick = () => {
          editor.runCommand('core:canvas-clear')
          // editor.Css.clear()
          editor.setComponents(codeViewer.getContent().trim())
          editor.Modal.close()
        }

where the codeViewer.getContent().trim() get simple html from a modal

artf commented 11 months ago

Please @boardmain provide a reproducible demo of your issue.

Closing this as right now it looks like you're doing something wrong locally as I'm not able to reproduce it.