Content-type: text/html Downes.ca ~ Stephen's Web ~ Re-implementing document.execCommand()

Stephen Downes

Knowledge, Learning, Community

At some point in the near future many content editing windows across the web may stop functioning. These are the windows you use to type in text and which have formatting buttons at the top so you can make text bold, italic, or whatever. Traditionally, they have relied on the document.execCommand() function in Javascript. This function turns out to be insecure, however, and has been depreciated. And there's no simple way to fix it. I took a look last night at what's involved to code your own. It's complex. Some people, like the author of this post, who in the past created the versatile DeckDeckGo application, have simply given up. Others, like the authors of the venerable TinyMCE editor, have taken the opportunity to squeeze their customers for higher fees. The authors of Facebook's Lexical have this nifty demo showing just what's involved. Editor.js offers a block editor, similar to what's used in WordPress. Here are more alternatives.

Today: 65 Total: 439 [Direct link] [Share]


Stephen Downes Stephen Downes, Casselman, Canada
stephen@downes.ca

Copyright 2024
Last Updated: Oct 06, 2024 5:21 p.m.

Canadian Flag Creative Commons License.

Force:yes