Re: [w3c/editing] Should execCommand dispatch beforeinput or not? (#200)

As a developer I can understand that it feels frustrating if there is something that isn't quite clean and where it feels that if only I invested a little more time I could get this to be much smoother and simpler.

However, I think it's misguided in the case of `execCommand`. We have an actual need of improvements in the area of editing, and they are not in any way related to `execCommand`. Yet that is what 80-90% of the focus here seems to be on. I cannot stress enough that efforts would be much better invested in just about anything other than `execCommand`.

`execCommand` cannot work unless you implement every single feature an editor needs because if just one feature relies on dom tree manipulation then the global history will be screwed. Imagine you have spent say 5 years creating an `execCommand`-based editor (lets just say that this would actually be possible), and then you get a feature request for one more thing that happens not to be covered by execCommand, or a bug report about something where `execCommand` outputs an incorrect DOM structure. The only option you now have is to throw away all your code and reimplement it all again using direct dom manipulation. That's one of the many reasons editors are not actually built on top of `execCommand`.

> I don't think "waste" is good term for `execCommand`. Both backward and cross browser compatibility of (unfortunately) existing API are important if they can be fixed by browser side.

Again, I get it from the view point of a developer. It's like stepping into a room and on the table there is a puzzle that looks like it's 50% done and you are being told to just throw it out rather than to finish it. If we had an ton of people to work on all this and everything from input events to Clipboard API, contenteditable-disabled, content menus, IME issues, etc. was spec'ed and implemented everywhere - sure no problem that some people try to go play with the puzzle. But as long as that is not the case, it just ends up being a gigantic distraction to constantly go back to `execCommand`.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/w3c/editing/issues/200#issuecomment-528442553

Received on Thursday, 5 September 2019 16:10:21 UTC