使用输入事件级别 2 创建一个富文本编辑器

huangapple go评论53阅读模式
英文:

Creating a RichTextEditor with INPUT Events level 2

问题

Document.execCommand 

已被弃用,
我读了一篇文章,它的替代品是 INPUT EVENTS LEVEL 2
但是没有示例

我不了解事件级别 2
所以我的问题是如何实现输入事件级别 2 以实现所见即所得编辑器

我尝试了 document.execCommand 但它现在已被弃用,我还搜索了关于输入事件级别 2 的好文章,但我什么也没有找到。

英文:
Document.execCommand 

Is now depreciated ,
I read an article that it's replacement is INPUT EVENTS LEVEL 2
But there were no Examples

I don't know about events level 2
So my question is how to implement input events level 2 to achieve WYSIWYG EDITOR

I tried document.execCommand but it's now deprecated I also searched a good article about input events level 2 but I founded nothing

答案1

得分: 0

Level 2目前处于W3C的草案阶段,可能需要多年才能实现。目前,execCommand是创建富文本编辑器而不会让你疯掉的最佳方法。

在涉及到富文本编辑器时,execCommand是一个例外情况,你会被建议使用一个已经被弃用的API。它已经被弃用多年,但浏览器无法没有它,所以它还会继续存在。

英文:

Level 2 is in W3C's draft stage and may take years to come to fruition. Currently execCommand is the best way to create a rich text editor without losing your mind.

When it comes to rich editors, execCommand is one of those exceptions where you'll be advised to use a deprecated API. Its been deprecated for years but browsers can't live without it so its not going anywhere.

huangapple
  • 本文由 发表于 2023年6月5日 23:01:06
  • 转载请务必保留本文链接:https://go.coder-hub.com/76407729.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定