Script tag not rendering in HTML page
我创建了如下的组件。 “''js const script = function() { const script = document.createElement('script'); script.src = 'http://localhost:8888/builder/sites/site1/assets/js/jquery-1.12.4.min.js'; document.body.appendChild(脚本); }); “''js 编辑。BlockManager.add('site1', { 标签:“模板1”, 分类:“模板”, 内容:“<div>这是我的内容</div>。” }); ``` site1 - 是我现成的...
artf
抱歉,我不明白你的问题出在哪里。你创建了“comp-with-js”组件,但却没有显示你在哪里使用它...... 请提供一个可复现的演示。
mingxin-yang
拖动块后脚本功能无法工作 @artf
mingxin-yang
https://grapesjs.com/docs/modules/Components-js.html#basic-scripts