:在外部更改 gjs-html 后刷新 Canvas
你好, 我一直在用GrapesJS配合ReactJS(GrapesJS位于自己的React组件中),但我在上传图片时遇到了问题,因为我自己在用React文件选择器组件时遇到了问题。 当我从文件选择器中的 react 组件选择图片时,因为它是 GrapesJS 外部的,我会手动更新本地存储中的 gjs-html 项,并通过 GrapesJS 组件中的 react 生命周期方法componentWillReceiveProps方法返回文件路径,效果很好,但我遇到的问题是,在修改 gjs-html 以更新 GrapesJS 画布后,无法触发更新,而我只能通过修改导入的图像显示在画布上,是要销毁 GrapesJS 实例并创建一个新的实例,...
ghost
看来我忘了 DomComponents,下载并查看 grapesjs-newsletter 的 src 后,我在 openImportCommand 里发现 DomComponents 正在更新。所以我在更新本地存储的 HTML 后,在我的 react component WillReceiveProps 方法里添加了以下内容。 “编辑。DomComponents.getWrapper().set('content', ''); editor.setComponents($...
cederron
看来我忘了 DomComponents,下载并查看 grapesjs-newsletter 的 src 后,我在 openImportCommand 里发现 DomComponents 正在更新。所以我在更新本地存储的 HTML 后,在我的 react component WillReceiveProps 方法里添加了以下内容。“编辑。DomComponents.getWrapper().set('content', '');editor.setComponents($f(...