React 自定义界面“模态”无法显示“代码”
你好@maxming2333,试着点击文本框中高亮区域内的任意位置,对我来说它加载代码...... https://github.com/user-attachments/assets/89f61dc6-466a-476a-b437-d0f8ae51c7ef
阅读下方完整回答 ↓问题
葡萄JS版本 [X] 我确认使用最新版本的GrapesJS 你用的是什么浏览器? 130.0.6723.117 可复制演示链接 https://stackblitz.com/edit/grapesjs-react-custom-ui?file=src%2FApp.tsx 描述一下那个虫子 如何复现这个漏洞?开放 https://grapesjs-react-custom-ui.stackblitz.io/点击此按钮 <img width=“537” alt=“image” src=“https://github.com/user-attachments/assets/35d33966-60b6-4a88-96c6-0c260d523af7”>“Modal”中无代码显示 <img width=“1127” alt=“image” src=“https://github.com/user-attachments/assets/761efaae-5061-4867-8367-832df023a9c8”> 预期的行为是什么? 在“Modal”中显示代码 目前的行为是什么? “Modal”中没有代码显示行为准则 [X] 我同意遵守本项目的行为准则
回答(3)
你好@maxming2333,试着点击文本框中高亮区域内的任意位置,对我来说它加载代码......
https://github.com/user-attachments/assets/89f61dc6-466a-476a-b437-d0f8ae51c7ef
嗨@maxming2333,试着点击文本框中高亮区域内的任意位置,对我来说它会加载代码......
Screen.Recording.2024-11-19.at.23.21.03.mov
是的,确实可以在点击弹窗区域后显示,但应该在弹窗打开后立即显示,而不是点击后。
谢谢你举报,@maxming2333。 关于React自定义UI“模态”无法显示“代码”的好问题。GrapesJS 推荐的方法是使用事件驱动 API。 从这里开始: 查看你所在模块的[GrapesJS文档](https://grapesjs.com/docs/) 寻找“on()”事件监听器方法 大多数操作可以通过监听编辑器和组件事件来实现 常见模式: “JavaScript 留意变化 editor.on('change', () => console.log('something changed')); 组件生命周期 editor.on('component:mount', (c) => c...
相关问答
通过相似的问题讨论继续研究。
问题 #6307
MJML 组件 'tagUpdated' 将使“悬停”变得不可能
葡萄JS版本 [X] 我确认使用最新版本的GrapesJS 你用的是什么浏览器? 130.0.6723.117 可复制演示链接 https://grapesjs.com/demo-mjml 描述一下那个虫子 如何复现这个漏洞?随机选择一个组件,比如演示页面的第二个“mj-sec...
问题 #6081
自定义组件在初次渲染时无法在 grapsjs/studio 中显示
葡萄JS版本[X] 我确认使用最新版本的GrapesJS你用的是什么浏览器? 镀铬可复制演示链接 https://stackblitz.com/edit/vitejs-vite-4noagg?file=src%2FApp.tsx描述一下那个虫子 我第一次在 React 应用渲染...
问题 #5263
如果删除组件但不删除其对应样式,之后添加新组件会导致样式冲突吗?
葡萄JS版本 [X] 我确认使用最新版本的GrapesJS 你用的是什么浏览器? 最新版本的Chrome浏览器 可复制演示链接 无效 描述一下那个虫子 如何复现这个漏洞? <img width=“1666” alt=“image” src=“https://github.com...
问题 #6669
层管理器中方块的跨层重排会导致分拣器错误并中断后续的移动尝试
GrapesJS版本 [x] 我确认使用最新版本的GrapesJS 你用的是什么浏览器? 铬 可复制演示链接 https://grapesjs.com/demo.html 描述一下那个虫子 如何复现这个漏洞? 从一个新的编辑器实例开始,画布是空的 从块面板中,将一个“1列”块拖...
与此问题匹配的付费插件
根据问题关键词和标签相关性精选,助你更快交付。
正在加载付费插件推荐……
相关教程
关于同一主题的深入指南。
教程
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.
浏览插件分类
直接跳转到市场上的插件分类页面。