Get onPaste() event information in render()
还没有人认领这个 Issue。
评估
- 难度
- 5/5
- 预计耗时
- 一周以上
- 新手友好度
- 25/100
- Issue 类型
- 功能
- 描述清晰度
- 需要澄清
- 活跃度
- 停滞
- 技术栈
- typescript
- 领域
- frontend
调研方向
首先跟踪 render() 和 onPaste() 周围的编辑器生命周期,重点关注图片上传插件何时创建文件输入并触发 onClick。确定是否可以在不破坏拖放行为的情况下公开事件上下文;完成标准是,粘贴或拖放的图片不再打开文件浏览器,同时直接插入图片仍保留预期行为。
由索引模型根据 Issue 内容生成。
描述
It seems that onPaste() fires after render(), I need to access whether or not the render() has been triggered by onPaste()... Anyway to do this or pass the onPaste() event information into the render()?
Use case, I have created an image upload plugin. The render() creates a file input which I then trigger an onClick event so it opens up the file browser straight away. Clicking add image then clicking another button to add image is horrible UX.
However, onPaste() this is onClick event is not required for dragging and dropping images etc. And currently dragging and dropping images will still open the file browser after pasting because the input is still created and the onClick happens before the onPaste() code runs.
The onPaste() code runs after render() I need a way to check if the render() is triggered by and onPaste event so I can disable this input onClick event.
Thanks
- 主要语言
- TypeScript
- 星标
- 32k
- 派生
- 2.2k
- PR 合并指标
- 30 天内没有已合并 PR
环境准备
这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
codex-team/editor.js 的其他 Issue
-
bug
难度 2/5 1-3 小时 新手友好度 70/100
codex-team/editor.js#3037 ·
-
Floating Promise Anti-Pattern & Premature Caret in Multi-Block Paste可能已有人在做 @anshurajbisoyi98-ctrl 于 18 天前认领。 未关闭bug good first issue
难度 2/5 1-3 小时 新手友好度 78/100
codex-team/editor.js#3032 · 1 条评论 ·
-
Silent Data Loss & Broken Error Contract in Saver.save()可能已有人在做 @Sion612 于 28 天前认领。 未关闭bug
难度 2/5 1-3 小时 新手友好度 82/100
codex-team/editor.js#3030 ·
-
Complete Omission of block.destroy() in Blocks Collection可能已有人在做 @Minhal128 于 27 天前认领。 未关闭bug
难度 2/5 1-3 小时 新手友好度 84/100
codex-team/editor.js#3029 ·
-
Bug: Link cannot be removed可能已有人在做 @prathmeshyelne 于 134 天前认领。 未关闭bug
难度 2/5 1-3 小时 新手友好度 65/100
codex-team/editor.js#3005 · 1 条评论 ·
查看 codex-team/editor.js 的全部 Issue
相似的 Issue
-
agent/scanner help wanted hive/claimed-by-scanner kind/bug stage/020-claimed
难度 2/5 1-3 小时 新手友好度 90/100
hivecommons/rationguard#315 ·
维护者通常 1 天内回复
-
agent-ready area: ui-sdk priority: p3 type: chore
难度 2/5 1-3 小时 新手友好度 76/100
schlessera/brain-kit#2534 ·
维护者通常 1 天内回复
-
bug lane:gh-5
难度 2/5 1-3 小时 新手友好度 72/100
LLM-4-People/bridlewise-testing#122 ·
维护者通常 1 天内回复
-
bug priority: P2
难度 1/5 1 小时以内 新手友好度 78/100
维护者通常 1 天内回复
-
enhancement priority:low ready-for-dev
难度 2/5 1-3 小时 新手友好度 67/100
维护者通常 1 天内回复