无法移除元素边界
你好@kuhelbeher新 https://github.com/artf/grapesjs/releases/tag/v0.18.1 发布后,这部分可以处理。 这里的主要问题是 [内置](https://grapesjs.com/docs/modules/Style-manager.html#built-in-properties)“border”属性的配置方式,它是一个 [Composite 类型](https://grapesjs.com/docs/api/property_composite.html),包括“border-width”、“border-style”和“border-color”。 这意味着编辑器能够理解...
阅读下方完整回答 ↓问题
葡萄JS版本
- 我确认使用最新版本的GrapesJS
你用的是什么浏览器?
Chrome v96
可复制演示链接
https://codesandbox.io/s/grapes-border-issue-94lje
描述一下那个虫子
如何复现这个漏洞?
- 选择带有上下边框的方块
- 前往风格面板 -> 装饰 -> 边框
- 清除边框颜色输入并按回车
预期的行为是什么? 边界应该被移除
目前的行为是什么? 边界依然存在。检查CSS,它会显示“border: 5px solid none;”,这是无效的值
我注意到这个问题只在边框通过不同的边框样式设置时出现,比如边框顶部和边框底部。 接下来的问题——如何通过样式面板正确移除边框?
行为准则
- 我同意遵守本项目的行为准则
回答(2)
你好@kuhelbeher新 https://github.com/artf/grapesjs/releases/tag/v0.18.1 发布后,这部分可以处理。 这里的主要问题是 [内置](https://grapesjs.com/docs/modules/Style-manager.html#built-in-properties)“border”属性的配置方式,它是一个 [Composite 类型](https://grapesjs.com/docs/api/property_composite.html),包括“border-width”、“border-style”和“border...
谢谢你举报,@kuhelbeher。 关于无法移除元素边界的好问题。推荐的 StyleManager 方法是使用事件驱动的 API。 从这里开始: 查看你所在模块的[GrapesJS文档](https://grapesjs.com/docs/) 寻找“on()”事件监听器方法 大多数操作可以通过监听编辑器和组件事件来实现 常见模式: “JavaScript 留意变化 editor.on('change', () => console.log('something changed')); 组件生命周期 editor.on('component:mount', (c) => console.lo...
相关问答
通过相似的问题讨论继续研究。
问题 #4341
在为 HTML 组件添加边界样式时,css json 只抓取边界选择器,却不抓取 border-width、border-style、border-colorBUG 的选择器:
葡萄JS版本 [X] 我确认使用最新版本的GrapesJS 你用的是什么浏览器? Chrome v101.0.4951.54 可复制演示链接 https://jsfiddle.net/7sn5h91r/7/ 描述一下那个虫子 我的问题是样式、边界、属性、宽度、样式和颜色在 JS...
问题 #6685
自定义组件样式在删除和重新添加后不会被应用
GrapesJS版本 [x] 我确认使用最新版本的GrapesJS 你用的是什么浏览器? Chrome v143.0.7499.193 可复制演示链接 https://codesandbox.io/p/sandbox/2l3887 描述一下那个虫子 如何复现这个漏洞? 打开页面...
问题 #5207
创建多页面时的重复CSS
葡萄JS版本 [X] 我确认使用最新版本的GrapesJS 你用的是什么浏览器? Chrome最新款 可复制演示链接 https://codesandbox.io/s/withered-bush-wv29dx?file=/index.js 描述一下那个虫子 如何复现这个漏洞?....
问题 #4015
拖放在RTL时效果不好
葡萄JS版本 [X] 我确认使用最新版本的GrapesJS 你用的是什么浏览器? Chrome v96 可复制演示链接 https://jsfiddle.net/emgbo8k1/3/ 描述一下那个虫子 如何复现这个漏洞?将三列积木添加到画布上拖放以改变列的顺序 预期的行为是什...
与此问题匹配的付费插件
根据问题关键词和标签相关性精选,助你更快交付。
正在加载付费插件推荐……
相关教程
关于同一主题的深入指南。
教程
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.
浏览插件分类
直接跳转到市场上的插件分类页面。