用 Vue+Vite 拖入嵌套组件时会崩溃。
这和这个[https://github.com/GrapesJS/grapesjs/issues/4497]类似,你必须把编辑器实例放在Vue实例之外,才能绕过它的代理
阅读下方完整回答 ↓问题
葡萄JS版本
- 我确认使用最新版本的GrapesJS
你用的是什么浏览器?
Firefox 112.0.2(64位)
可复制演示链接
https://github.com/TO-JHummel/grapesjs-issue
描述一下那个虫子
如何复现这个漏洞?
- 启动最小的vue+vite页面。
- 将capitalized_for块放入编辑器中。
- 将一列模块放入编辑器中,放置在另一个模块之外。
- 将capitalized_for块上的每个div拖拽到1列块中。
预期的行为是什么? 方块只需直接放入柱中即可。
目前的行为是什么? 浏览器在放下最后一个块时会卡死。
行为准则
- 我同意遵守本项目的行为准则
回答(2)
谢谢你举报,@TO-JHummel。 关于用Vue+Vite拖入嵌套组件时崩溃的问题很棒。GrapesJS 推荐的方法是使用事件驱动 API。 从这里开始: 查看你所在模块的[GrapesJS文档](https://grapesjs.com/docs/) 寻找“on()”事件监听器方法 大多数操作可以通过监听编辑器和组件事件来实现 常见模式: “JavaScript 留意变化 editor.on('change', () => console.log('something changed')); 组件生命周期 editor.on('component:mount', (c) => conso...
相关问答
通过相似的问题讨论继续研究。
问题 #6659
符号样式未同步
GrapesJS版本 [x] 我确认使用最新版本的GrapesJS 你用的是什么浏览器? Firefox 145.0(64位) 可复制演示链接 https://jsfiddle.net/arturarseniev/ta19s6go/ 描述一下那个虫子 如何复现这个漏洞? 进入官...
问题 #6211
递归过多
葡萄JS版本 [X] 我确认使用最新版本的GrapesJS 你用的是什么浏览器? Firefox 131.0.2 可复制演示链接 https://grapesjs.com/demo-newsletter-editor.html 描述一下那个虫子 如何复现这个漏洞?进入 grap...
问题 #4083
Set root 不起作用
葡萄JS版本[X] 我确认使用最新版本的GrapesJS你用的是什么浏览器? Safari 15.0可复制演示链接 https://jsfiddle.net/adw6y12f/9/描述一下那个虫子 你好, 我正在尝试按照[这里](https://github.com/artf/...
问题 #5487
样式管理器不会为同一类显示多个规则
葡萄JS版本 [X] 我确认使用最新版本的GrapesJS 你用的是什么浏览器? Firefox 可复制演示链接 https://jsfiddle.net/497zkrpm/1/ 描述一下那个虫子 如何复现这个漏洞?选择“Hello World”组件打开样式管理器,确保在类部分...
与此问题匹配的付费插件
根据问题关键词和标签相关性精选,助你更快交付。
正在加载付费插件推荐……
相关教程
关于同一主题的深入指南。
教程
GrapesJS DevTools: A Developer Panel Inside Your Editor
If you've ever debugged GrapesJS with console.log(editor.getSelected()) and a dozen throwaway event listeners — this post is for you.
教程
How to Build a Production GrapesJS Editor: The Complete Walkthrough of Brief, Preset, Plugins, and Services
A complete walkthrough of building a production GrapesJS editor: how to choose a preset, pick plugins, and scope setup services without burning a sprint.
教程
Big Updates: TinyMCE 8 and Placeholder 2.0 for GrapesJS
In May we shipped major updates to two of our most popular GrapesJS plugins — TinyMCE Inline Text Editor and Placeholder.
浏览插件分类
直接跳转到市场上的插件分类页面。