Angular4中的“CanvasView.frame.el.contentDocument is null”
问题
你好,我已经把Grapejs集成到了Angular4里。我加了自定义按钮。点击编辑按钮后出现错误: 类型错误 列号:7 文件名:“http://localhost:4200/vendor.js” 线路编号:78800 消息:“CanvasView.frame.el.contentDocument is null” ngOnInit() { console.log(“oninit”) this.editor = grapesjs.init({ allowScripts:1, 展示偏移集:1, 自动渲染:0, noticeOnUnload: 0, 容器:“#gjs”, 身高:“100%”, fromElement: true, clearOnRender: 0, storageManager: {autoload: 0}, }); } 编辑(){ console.log(“编辑”,本编辑器) this.editor.runCommand('sw-visibility'); this.nameModel='你好,葡萄 编辑!' this.editor.render(); // } 编辑Btn(){ console.log('editBtn',本编辑器) this.editor.setComponents(this.editor.getHtml()) this.edito...
回答(2)
有一个非常相似的问题#1288,请在这里讨论。 顺便说一句,这种情况我需要一个极简的现场演示
由于关闭后没有近期活动,该帖子已被自动锁定。请为相关漏洞开启新一期。
相关问答
通过相似的问题讨论继续研究。
问题 #507
上传文件在丢弃文件上被调用了两次?
我有一个编辑器,初始化如下: 如果我把图片添加到画布,然后试图通过拖拽到模态的投放区域上传新图片,uploadFile函数会被调用两次。点击上传区域,然后从Windows对话框中选择文件上传,效果很好,它只调用该函数一次。
问题 #998
资产管理器上传图片时发送空请求
描述:GrapesJS 编辑器在 editor.html 文件中初始化如下: “localhost:9001”是运行PHP5的本地IIS服务器。“uploadimage.php”的内容如下: 由于从GrapesJS上传的图片预计会在“$FILES”数组中,每次请求到达该页面时,...
问题 #2073
使用 urlLoad 遇到的问题
我在调用终端加载模板时遇到问题,它正在执行预检选项请求,但我找不到在确认后继续的方法 componentDidMount() { this.editor = GrapesJS.init({ 容器:“#grapeEditor”, 插件:[gjsPresetNewsletter],...
问题 #909
事件不是在画布上拖放的。
大家好。 问题是: 事件在拖延(进入)画布后,就不再火了。 editor.on('canvas:dragover') Editor.on('canvas:drop') Editor.on('canvas:Dragenter') editor.on('canvas:dragend...
与此问题匹配的付费插件
根据问题关键词和标签相关性精选,助你更快交付。
正在加载付费插件推荐……
相关教程
关于同一主题的深入指南。
浏览插件分类
直接跳转到市场上的插件分类页面。