Files
iwb-plugins-desktop/image-annotate/package.json
T
qiqi 5f9303986a feat(image-annotate): 编辑器内 ⌘/Ctrl+V 粘贴剪贴板图片为新图层(1.0.4)
- 粘贴优先级:剪贴板图片文件 > text/html 的 <img src> > text/plain 图片 URL/data URL
- 命中后进入既有「图片放置」模式(拖动/缩放,点外部或回车确认,Esc 取消)
- URL 一律 fetch→blob→dataURL(跨域图直接挂 <img> 会污染画布,导出时 toBlob 抛 SecurityError);
  data: URL 反而不能 fetch(CSP connect-src 无 data:),直接走 loadImage
- 命中即 stopImmediatePropagation:宿主在 window 气泡阶段也监听 paste(建 ref 节点+下载),
  不掐断会一次粘贴双响应,且宿主抢先建节点会破坏后续「覆盖」写回(e2e 实测抓到)
- 正在文字输入框打字时不抢 text/html 与 text/plain 的粘贴
- e2e 新增合成 ClipboardEvent 粘贴用例;修过期 SRI 断言(内容寻址名带哈希)
2026-11-04 15:49:50 +08:00

12 lines
295 B
JSON
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
{
"name": "@iwb-plugin/image-annotate",
"private": true,
"version": "1.0.4",
"description": "IWB 插件:图片标注 / 修图(编辑器移植自 iwb-plaus 扩展,纯 Canvas 2D)",
"ibwPlugin": {
"id": "image-annotate",
"entry": "src/index.js",
"apiVersion": 1
}
}