内容为“null”的TextNode被渲染为“null”,而不是空白
问题
葡萄JS版本[X] 我确认使用最新版本的GrapesJS你用的是什么浏览器? Chrome 版本 114.0.5735.199(官方构建)(64位)可复制演示链接 无描述一下那个虫子 如何复现这个漏洞?丢弃该组件 '<div class=\“flex items-center rounded shadow-md overflow-hidden max-w-xl relative dark:bg-gray-900 dark:text-gray-100\”> <div class=\“self-stretch flex items-center px-3 flex-shrink-0 dark:bg-gray-700 dark:text-violet-400\”> <svg xmlns=\“http://www.w3.org/2000/svg\” fill=\“none\” viewBox=\“0 0 24\” stroke=\“currentColor\” class=\“h-8 w-8\”><path stroke-linecap=\“round\” stroke-linejoin=\“round\” stroke-width=\“2\” d=\“M10 14l2-2m0 0l2-2m-2 2l-2m22l2 2m7-2a9 9 0 11-18 0 9 9 0 0118 0z\“>...
回答(4)
大概是在八月的第一周
你好@joukhar最新版本是不是也这样?
如果我用你的 JSON 示例,我能在导出代码中看到“null”(这应该可以修复),但我无法用你的 HTML 示例生成带有 “null” 的 “textnode”,你能为这个用例创建一个可复现的演示吗?
不确定在哪种情况下textnode可能是“null”,但我们可以肯定能防止这种情况......
谢谢你的重玩,如果你需要试玩版,请给我点时间,等我做完会再评论 问题只在存储和加载时出现,但第一次丢弃组件时却没有反应
谢谢你举报,@joukhar。 关于内容为“null”的textnode被渲染为“null”而不是空白,这个问题很棒。ProseMirror 推荐的方法是使用事件驱动的 API。 从这里开始: 查看你所在模块的[GrapesJS文档](https://grapesjs.com/docs/) 寻找“on()”事件监听器方法 大多数操作可以通过监听编辑器和组件事件来实现 常见模式: “JavaScript 留意变化 editor.on('change', () => console.log('something changed')); 组件生命周期 editor.on('component:mo...
相关问答
通过相似的问题讨论继续研究。
问题 #6685
自定义组件样式在删除和重新添加后不会被应用
GrapesJS版本 [x] 我确认使用最新版本的GrapesJS 你用的是什么浏览器? Chrome v143.0.7499.193 可复制演示链接 https://codesandbox.io/p/sandbox/2l3887 描述一下那个虫子 如何复现这个漏洞? 打开页面...
问题 #5990
当你删除组件时,组件间的重复类也会被删除。
葡萄JS版本 [X] 我确认使用最新版本的GrapesJS 你用的是什么浏览器? Chrome 126.0.6478.127(Windows) 可复制演示链接 https://jsfiddle.net/t06s4oLb/8/ 描述一下那个虫子 如何复现这个漏洞?将第1节添加到画...
问题 #4474
无头模式运行需要窗口
葡萄JS版本[X] 我确认使用最新版本的GrapesJS你用的是什么浏览器? Chrome 103.0.5060.134可复制演示链接 https://stackblitz.com/edit/node-zrdtg4?file=index.js描述一下那个虫子 如何复现这个漏洞?...
问题 #4754
关闭脚本</script>属性的“''标签无法逃脱
葡萄JS版本 [X] 我确认使用最新版本的GrapesJS 你用的是什么浏览器? Chrome 版本 107.0.5304.122(64 位) 可复制演示链接 https://jsfiddle.net/j5khz1gm/ 描述一下那个虫子 如何复现这个漏洞?创建具有以下默认属性...
与此问题匹配的付费插件
根据问题关键词和标签相关性精选,助你更快交付。
正在加载付费插件推荐……
相关教程
关于同一主题的深入指南。
教程
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.
教程
Find the Right GrapesJS Plugin in Seconds: Smarter Discovery Is Live
We're shipping a set of discovery upgrades. New label filters, a proper compatibility switch for GrapesJS vs Studio, one-click and a smarter sort bar.
浏览插件分类
直接跳转到市场上的插件分类页面。