我每次添加方块时都需要重新加载“https://.../main.js”,我该怎么办?
I need to reload "https://.../main.js" every time I add a block,what should I do?
artf
订阅你认为可能有用的[事件](https://grapesjs.com/docs/api/editor.html#available-events),然后按意愿重新加载
GJSBlock
谢谢你举报,@sizhousama。 关于[问题]我每次添加一个方块时都需要重新加载“https://.../main.js”,这是个很好的问题,我该怎么办?。GrapesJS 推荐的方法是使用事件驱动 API。 从这里开始: 查看你所在模块的[GrapesJS文档](https://grapesjs.com/docs/) 寻找“on()”事件监听器方法 大多数操作可以通过监听编辑器和组件事件来实现 常见模式: “JavaScript 留意变化 editor.on('cha...