opentiny/tiny-editor

🐛 [Bug]: document.execCommand() is deprecated, need to look for alternative solutions

Open

#97 opened on Oct 22, 2024

View on GitHub
 (0 comments) (0 reactions) (0 assignees)TypeScript (72 forks)auto 404
buggood first issue

Repository metrics

Stars
 (530 stars)
PR merge metrics
 (PR metrics pending)

Description

Version

latest

Link to minimal reproduction

document.execCommand() 已经废弃,参考: https://developer.mozilla.org/zh-CN/docs/Web/API/Document/execCommand

在源码中全局搜索:document.execCommand,table 和 image 模块均使用了 document.execCommand()。

  • table-operation-menu.ts document.execCommand('copy')
  • image.ts document.execCommand('enableObjectResizing')

document.execCommand('copy') 的替代方案可参考: https://developer.mozilla.org/zh-CN/docs/Web/API/Clipboard_API

Step to reproduce

同上

What is expected

No response

What is actually happening

No response

What is your project name

Wiki

Any additional comments (optional)

No response

Contributor guide