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

オープン
#97 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
35/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
停滞
技術スタック
typescript
領域
frontend

調査の方向性

まずソース内で document.execCommand を検索します。特に table-operation-menu.ts と image.ts を確認してください。copy の使用方法について、issue にリンクされている Clipboard API のリファレンスを読み、その後 copy と enableObjectResizing の呼び出しの両方について代替手段を特定します。非推奨の呼び出しが置き換えられ、テーブルのコピーと画像のリサイズの動作が引き続き利用できれば完了です。

索引モデルが issue の本文から書いたものです。

説明

bug good first issue
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

主要言語
TypeScript
スター
538
フォーク
72
平均マージ
14日 8時間
マージ済み PR(30日)
1

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

opentiny/tiny-editor のほかの issue

opentiny/tiny-editor の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。