[Feature] 期望有粘贴动作的事件,方便开发者用来校验粘贴内容的合法性,并根据是否合规来阻断粘贴事件
Open
Nobody has claimed this yet.
feature
- Dominant language
- TypeScript
- Stars
- 3.7k
- Forks
- 486
- Avg merge
- 1d 19h
- Merged PRs (30d)
- 16
Description
What problem does this feature solve?
现状:目前看event中有COPY_DATA事件,用来监听复制操作,但是没有找到粘贴的事件
期望:能够提供触发粘贴前的事件,在用户触发粘贴动作时,抛出事件和要粘贴的内容
目的:方便开发者用来校验粘贴内容的合法性,并根据是否合规来阻断粘贴事件
场景举例:用户复制了两列文本单元格,尝试粘贴到两列日期单元格中.当用户粘贴时,开发者监听内容判断不合理,阻断粘贴进行,并向用户给出message提示
What does the proposed API look like?
如:events.COPY_DATA
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 locating the existing events.COPY_DATA definition and the code path that dispatches it. Determine how a pre-paste event could expose clipboard content and allow validation or blocking; done means the proposed event supports the two-column/date-cell scenario and has documented behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- api, frontend
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 30/100