On Wed, May 21, 2014 at 2:01 AM, Glenn Maynard <gl...@zewt.org> wrote: > I think I'd suggest avoiding the mess of execCommand altogether, and add new > methods, eg. window.copy() and window.cut() (or maybe just one method, with > a "cut" option). execCommand is such a nonsensical way to expose an API > that trying to stay consistent with its commands is probably not much of a > win.
I'm inclined to agree, FWIW. If the command is really strictly editor-related, and makes sense only in conjunction with an editor based on existing commands, I would add it to execCommand for consistency (like defaultParagraphSeparator or fontSizePt). But anything else should stay far away. (Actually, if contenteditable wasn't an unsalvageable trainwreck, I would rather write a new API that actually follows JS norms, like window.editor.bold() or similar, but it is, so there's no point in doing anything beyond *maybe* trying to get it a bit more interoperable.)