边框半径的显示顺序不正确
问题
葡萄JS版本 [X] 我确认使用最新版本的GrapesJS 你用的是什么浏览器? Chrome v130 可复制演示链接 https://grapesjs.com/demo-newsletter-editor.html 描述一下那个虫子 如何复现这个漏洞?在编辑器中选择任意元素在样式部分,前往边界半径 预期的行为是什么? 四个角落的边界半径设置显示如下: 左上右上 左下至右 目前的行为是什么? 底部角落的边框半径设置互换了: 左上右上 右下-左下 <img width=“217” alt=“Bildschirmfoto 2025-01-14 um 11 47 36” src=“https://github.com/user-attachments/assets/c19c2f8a-cc8e-46fc-b580-2e085955d194” /> 在新的GrapesJS工作室中,展示顺序是正确的! <img width=“245” alt=“Bildschirmfoto 2025-01-14 um 11 46 18” src=“https://github.com/user-attachments/assets/0a20553e-8439-45e5-b861-1fc54080d46b” />行为准则 [X] 我同意遵守本项目的行为准则
回答(2)
这个改动解决了界面问题,但也带来了数值问题。设置左下角半径时,实际上是修改了右下角。
谢谢你举报,@hubermat。 关于边框半径的显示顺序不正确,这是个很好的问题。推荐的 StyleManager 方法是使用事件驱动的 API。 从这里开始: 查看你所在模块的[GrapesJS文档](https://grapesjs.com/docs/) 寻找“on()”事件监听器方法 大多数操作可以通过监听编辑器和组件事件来实现 常见模式: “JavaScript 留意变化 editor.on('change', () => console.log('something changed')); 组件生命周期 editor.on('component:mount', (c) => con...
相关问答
通过相似的问题讨论继续研究。
问题 #5346
删除组件而不删除其对应样式
葡萄JS版本 [X] 我确认使用最新版本的GrapesJS 你用的是什么浏览器? 最新版本的Chrome浏览器 可复制演示链接 https://grapesjs.com/demo.html 描述一下那个虫子 如何复现这个漏洞? <img width=“1665” alt=“im...
问题 #5263
如果删除组件但不删除其对应样式,之后添加新组件会导致样式冲突吗?
葡萄JS版本 [X] 我确认使用最新版本的GrapesJS 你用的是什么浏览器? 最新版本的Chrome浏览器 可复制演示链接 无效 描述一下那个虫子 如何复现这个漏洞? <img width=“1666” alt=“image” src=“https://github.com...
问题 #5249
编辑?Css.addRules(targetCss);
葡萄JS版本 [X] 我确认使用最新版本的GrapesJS 你用的是什么浏览器? 最新版本的Chrome浏览器 可复制演示链接 无效 描述一下那个虫子 如何复现这个漏洞? 编辑?Css.addRules(targetCss); 预期的行为是什么? 编辑?Css.addRules...
问题 #5668
CompoentTextView 的源码图无法加载
葡萄JS版本 [X] 我确认使用最新版本的GrapesJS 你用的是什么浏览器? 版本 121.0.6167.139(官方构建)(x86_64) 可复制演示链接 没有。 描述一下那个虫子 如何复现这个漏洞?添加自定义断点并设置断点点击步出直到进入组件文本视图的逻辑 预期的行为是...
与此问题匹配的付费插件
根据问题关键词和标签相关性精选,助你更快交付。
正在加载付费插件推荐……
相关教程
关于同一主题的深入指南。
教程
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.
浏览插件分类
直接跳转到市场上的插件分类页面。