编辑?Css.addRules(targetCss);
问题
葡萄JS版本
- 我确认使用最新版本的GrapesJS
你用的是什么浏览器?
最新版本的Chrome浏览器
可复制演示链接
无效
描述一下那个虫子
如何复现这个漏洞?
编辑?Css.addRules(targetCss);
预期的行为是什么?
编辑?Css.addRules(targetCss); 它为结尾增添了风格 <img width=“826” alt=“image” src=“https://github.com/GrapesJS/grapesjs/assets/114127651/28425b0a-b9f7-46a8-b8bc-736aa112cc3c”>
目前的行为是什么?
我帮忙编辑吗?Css.addRules(targetCss,{at : 0});
我想在数组的开头添加样式,而不是在结尾。 ...
如果需要执行某些代码以重现该漏洞,请将其粘贴到下面: “''js 你的代码在这里
### 行为准则
- [X] 我同意遵守本项目的行为准则
回答(3)
这不是个bug,'Css.addRules'没有任何选项参数。 你可以就这个话题展开讨论,我们可以看看是否有必要引入它
好的,我明白了,我需要在数组前面添加样式,而不是在最后。比如 arr.unshift(css)。我该怎么做?我可能需要你帮帮我
谢谢你举报,@pittleCheung。 关于编辑?的好问题。Css.addRules(targetCss);.推荐的 StyleManager 方法是使用事件驱动的 API。 从这里开始: 查看你所在模块的[GrapesJS文档](https://grapesjs.com/docs/) 寻找“on()”事件监听器方法 大多数操作可以通过监听编辑器和组件事件来实现 常见模式: “JavaScript 留意变化 editor.on('change', () => console.log('something changed')); 组件生命周期 editor.on('component:mou...
相关问答
通过相似的问题讨论继续研究。
问题 #5263
如果删除组件但不删除其对应样式,之后添加新组件会导致样式冲突吗?
葡萄JS版本 [X] 我确认使用最新版本的GrapesJS 你用的是什么浏览器? 最新版本的Chrome浏览器 可复制演示链接 无效 描述一下那个虫子 如何复现这个漏洞? <img width=“1666” alt=“image” src=“https://github.com...
问题 #5346
删除组件而不删除其对应样式
葡萄JS版本 [X] 我确认使用最新版本的GrapesJS 你用的是什么浏览器? 最新版本的Chrome浏览器 可复制演示链接 https://grapesjs.com/demo.html 描述一下那个虫子 如何复现这个漏洞? <img width=“1665” alt=“im...
问题 #6369
边框半径的显示顺序不正确
葡萄JS版本 [X] 我确认使用最新版本的GrapesJS 你用的是什么浏览器? Chrome v130 可复制演示链接 https://grapesjs.com/demo-newsletter-editor.html 描述一下那个虫子 如何复现这个漏洞?在编辑器中选择任意元素...
问题 #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.
浏览插件分类
直接跳转到市场上的插件分类页面。