opentiny / opentiny/tiny-editor
🐛 [Bug]: document.execCommand() is deprecated, need to look for alternative solutions
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 535
- Forks
- 71
- Avg merge
- 6h 50m
- Merged PRs (30d)
- 2
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
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by searching the source for document.execCommand, especially table-operation-menu.ts and image.ts. Read the Clipboard API reference linked in the issue for the copy usage, then identify alternatives for both the copy and enableObjectResizing calls. Done means the deprecated calls are replaced while the table copy and image resizing behavior remain available.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100