execCommand() is now obsolete, what's the alternative?
问题 I intended to use Document.execCommand() method along with contenteditable attribute to build my custom WYSIWYG editor. But when I checked the documentation for Document.execCommand() , I found that it's now obsolete. What's the modern (or extant) alternative for it? 回答1: I created the Rich Editor for my platform's XML (HTML5 + XHTML) editing purposes. I would not say that document.execCommand() is completely dead because some parts of it still work fine. Unfortunately the primary issue for