codex-team / codex-team/editor.js
[bug] onChange is thrown infinitely with image-simple and mermaid plugins
- 主要语言
- TypeScript
- 星标
- 31.9k
- 派生
- 2.2k
- 平均合并
- 1 天 13 小时
- 30 天内合并 PR
- 2
描述
I'm working on a editorjs app synced by Yjs.
it seems to work great with most of the plugins. and sync is reported to other users, but with two plugins (image-simple & mermaid), the onChange function seems to be thrown every second .
I use the onChange function to save the editor content to a yMap of Yjs
The issue is that each of the two users, get infinite refresh of the page.
is this onChange event thrown by the editor or by the concerned plugins ? is this an issue for each plugin ?
my editor code is here https://github.com/scenaristeur/noosphere/blob/main/src/views/EditorView.vue
see demo video and working app at https://scenaristeur.github.io/noosphere/about
https://user-images.githubusercontent.com/4020744/189363842-d732cdf5-f988-46bc-9919-2d83e89ebaa2.mp4
贡献指南
这个仓库没有索引到贡献指南
调研方向
从链接的 src/views/EditorView.vue 开始,使用 image-simple 和 mermaid 插件,以及 issue 中描述的 onChange 处理程序和 Yjs 同步来复现该行为。以链接的演示和视频作为行为参考,比较重复的 onChange 事件是源自编辑器还是任一插件。完成的标准是确定来源并停止无限刷新循环。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- javascript, typescript
- 领域
- frontend
- Issue 类型
- 缺陷
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 活跃度
- 停滞
- 描述清晰度
- 需要澄清
- 新手友好度
- 25/100