:在 grapesjs.init 中加入组件
能否在 grapesjs.init 上初始化组件。 我们没有使用 StorageManager.load。 我们已经在init时拿到了项目数据。 用 HTML 没问题,但用组件会把组件对象渲染成编辑器中的文本。 'this.editor = grapesjs.init({ components: projectData.components ||projectData.html, style: projectData.styles ||projectData.css, 容器:“#gjs”, 插件: ['GJS-preset-webpage'], pluginsOpts: { 'gjs-preset-webpage': { } },...
cjpollard
你需要解析字符串。 'JSON.parse(projectData.components)'
Controlhaus
现在工作。 感谢你快速且准确的回复 :-)
lock[bot]
由于关闭后没有近期活动,该帖子已被自动锁定。请为相关漏洞开启新一期。