ChangesCount 是递增的,但不应用任何更改
问题
[double-click.pptx](https://github.com/artf/grapesjs/files/5705054/double-click.pptx)
有没有可能,当你只双击某个组件时,“changesCount”参数并没有被递增?
当你双击且没有任何更改时,参数“changesCount”会被递增。
我在pptx文件里附上了视频,展示了这种行为。
这在任何浏览器中都是可以复现的。
回答(2)
应该会在下一个版本中修复
谢谢你举报,@marcepoblet。 关于changesCount是递增的,但没有应用变化,这个问题很棒。推荐的组件方法是使用事件驱动的API。 从这里开始: 查看你所在模块的[GrapesJS文档](https://grapesjs.com/docs/) 寻找“on()”事件监听器方法 大多数操作可以通过监听编辑器和组件事件来实现 常见模式: “JavaScript 留意变化 editor.on('change', () => console.log('something changed')); 组件生命周期 editor.on('component:mount', (c) => con...
相关问答
通过相似的问题讨论继续研究。
问题 #3683
如何设置组件无法删除

问题 #3612
葡萄的滑块按钮和标签键都没有按预期工作
版本 0.17.19(grapesjs) 版本 0.1.5(grapesjs-lory-slider) 版本 1.0.6(grapesjs-tabs) 你能重现演示中的bug吗? 不 预期的行为是什么? 我应该能在点击前一、下一页按钮和标签名时,浏览不同的幻灯片和标签页。 详细...
问题 #3496
成就:标记组件为脏
你想给GrapesJS添加什么? 组件应该能够标记自己为脏,触发“onbeforeunload”警告信息。 详细描述你的功能需求详细 我有一个(自定义)文本组件,用户可以输入任意文本。我把数据存储在服务器上,我想要自动保存。不过,我不希望服务器因为每一个字符都被联系到文本组件,...
问题 #3184
点击关于将 grapesjs-style-bg 插件集成到网页构建器的问题
我使用的是 GrapesJS 版本(0.16.27),并且在编辑器中集成了 grapesjs-style-bg 插件。功能完全正常。但点击背景属性的标签页时,问题就出现了。它立刻切换了标签页。 尤其是在选择渐变选项时,我已经集成了插件,正如本[问题](https://githu...
与此问题匹配的付费插件
根据问题关键词和标签相关性精选,助你更快交付。
正在加载付费插件推荐……
相关教程
关于同一主题的深入指南。
教程
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.
浏览插件分类
直接跳转到市场上的插件分类页面。