- From: Johannes Wilm <johannes@fiduswriter.com>
- Date: Mon, 12 May 2014 00:46:06 +0200
- To: Ben Peters <Ben.Peters@microsoft.com>
- Cc: "public-webapps@w3.org" <public-webapps@w3.org>
- Message-ID: <CABkgm-RCYxddwzEpnGweA=esu7OhvVNfgfVnE_nFaWkFCA9t2g@mail.gmail.com>
Also this looks good. There seems to be consensus that contenteditable is just not going o get fixed, and so removing the faulty behavior entirely and replacing it with this would be almost as good. Intercepting key strokes is already now possible and probably the best one can do. The one thing where this gets complicated is when typing characters using more than one key stroke. such as ~ + n to make ñ. I am not sure if you include that under the "Some keyboard input handling". On Fri, May 2, 2014 at 2:31 AM, Ben Peters <Ben.Peters@microsoft.com> wrote: > I have been discussing a new concept with some people for enabling a > subset of contentEditable behavior without all of the built-in formatting > and some other functionality. It was discussed a bit at the Extensible Web > Summit [1]. Below is a draft I wrote about this, which is also on GitHub > [2]. We would like feedback on this concept from the broader community. > > Problem > HTML uses the contentEditable='true' attribute to allow text input. The > behavior of contentEditable varies widely from browser to browser and is > very complex, resulting in many bugs and behavior differences between > browsers. Editing frameworks like TinyMCE, goog.editor, and CKEditor are > used in thousands of sites to overcome these issues. However, built-in > browser editing varies so much that these frameworks and sites like Google > Docs and Microsoft Office Online that have built custom solutions end up > disable a large portion of the functionality of contentEditable. Ultimately > this means that browsers support functionality that is largely disabled, > and frameworks and sites have to work around the default behavior. > > Proposal > To make this simpler for sites, frameworks, and browsers, it makes sense > to enable a new, simpler version of contentEditable that provides basic > functionality only. For the sake of discussion, call it > contentEditable='minimal'. The functionality provided by the browser under > contentEditable='minimal' would be as follows: > * Caret drawing > * Events such as Keyboard , Clipboard, Drag and Drop > * Some keyboard input handling- caret movement, typing of characters > including Input Method Editor input > * Selection drawing and manipulation according to the new Selection API > spec > > Frameworks and sites would then enable any formatting they desire using > script. > > - Ben > > [1] http://oksoclap.com/p/extensible_content_editing > [2] https://github.com/w3c/editing-explainer/wiki/contentEditable=minimal > > -- Johannes Wilm Fidus Writer http://www.fiduswriter.com
Received on Sunday, 11 May 2014 22:46:34 UTC