官方的解析@keyframes方法并不起作用
你好@wunksert之前有个与关键帧相关的问题[这里](https://github.com/artf/grapesjs/issues/4727),已经修复但还没发布。
阅读下方完整回答 ↓问题
葡萄JS版本[X] 我确认使用最新版本的GrapesJS你用的是什么浏览器? Chrome v107描述一下那个虫子 如何复现这个漏洞?按照[这里](https://grapesjs.com/docs/guides/Custom-CSS-parser.html#rule-objects)的说明创建你自己的CSS解析器,并输入@keyframes规则的CSS字符串。我用了这里预建的帖子解析器:[这里](https://github.com/artf/grapesjs-parser-postcss/blob/master/src/parser.ts)结构从解析器中导出并与文档匹配(见附图),但没有动画 <img width=“302” alt=“截图 2022-12-01 晚上8:59:53” src=“https://user-images.githubusercontent.com/12617956/205198051-0dc468a7-c0cb-4649-9429-a92c001e4117.png”> 预期的行为是什么? 动画 目前的行为是什么? 元素本身不会被激活。这是HTML结构......我可能错了,但我觉得它不能把那个解析成动画。带有“animation-name: spinAnimation”的元素显然看不到它。 <img width=“483” alt=“截图 20...
回答(4)
你好@wunksert之前有个与关键帧相关的问题[这里](https://github.com/artf/grapesjs/issues/4727),已经修复但还没发布。
@artf太棒了!你知道什么时候会发布吗?
谢谢你举报,@wunksert。 关于解析@keyframes的文档方法不起作用,这个问题非常好。推荐的 StyleManager 方法是使用事件驱动的 API。 从这里开始: 查看你所在模块的[GrapesJS文档](https://grapesjs.com/docs/) 寻找“on()”事件监听器方法 大多数操作可以通过监听编辑器和组件事件来实现 常见模式: “JavaScript 留意变化 editor.on('change', () => console.log('something changed')); 组件生命周期 editor.on('component:mount', (c...
相关问答
通过相似的问题讨论继续研究。
问题 #3235
“component:update”在组件移动时不会触发
摘自 https://github.com/artf/grapesjs/blob/dev/src/editor/index.js#L33'component:update' - 当组件被更新(移动、样式等)时触发,模型作为参数传递给回调 重现这个bug使用“move”API 移...
问题 #5525
在单个组件中添加超过 20 个类时,性能问题
葡萄JS版本 [X] 我确认使用最新版本的GrapesJS 你用的是什么浏览器? Edge v119.0.2151.72 可复制演示链接 https://grapesjs.com/demo.html 描述一下那个虫子 你好,感谢你创建了一个了不起的项目。我想报告使用Grapes...
问题 #5460
从“pageManager”加载“组件”和“样式”
葡萄JS版本[X] 我确认使用最新版本的GrapesJS你用的是什么浏览器? Chrome v117.0.5938.149可复制演示链接 https://jsfiddle.net/9oLrsvya/描述一下那个虫子 如何复现这个漏洞?请参见 jsfiddle 中的“pageMa...
问题 #4434
CSS 解析器的 shape 不允许 CSS 属性被定义超过一次。
葡萄JS版本[X] 我确认使用最新版本的GrapesJS你用的是什么浏览器? 任何可复制演示链接 https://grapesjs.com/demo.html描述一下那个虫子 这个漏洞和“ParserCss.js”有关。 https://github.com/artf/grap...
与此问题匹配的付费插件
根据问题关键词和标签相关性精选,助你更快交付。
正在加载付费插件推荐……
相关教程
关于同一主题的深入指南。
教程
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.
浏览插件分类
直接跳转到市场上的插件分类页面。