W3C home > Mailing lists > Public > public-webapps@w3.org > April to June 2014

Re: [editing] CommandQuery Object and Event

From: Ryosuke Niwa <rniwa@apple.com>
Date: Fri, 06 Jun 2014 09:28:19 -0700
Cc: Ben Peters <Ben.Peters@microsoft.com>, "public-webapps@w3.org" <public-webapps@w3.org>
Message-id: <531E9FE7-B067-4EFF-82A5-7D6FE6A64951@apple.com>
To: Robin Berjon <robin@w3.org>, Piotr Koszuliński <p.koszulinski@cksource.com>

On Jun 6, 2014, at 7:30 AM, Robin Berjon <robin@w3.org> wrote:

> On 06/06/2014 13:29 , Piotr Koszuliński wrote:
>> 1. That we need any native UI related to cE at all.
>> We don't. We can display our own toolbars, with our own buttons, with
>> our own icons and implementing our own logic. So the easiest solution to
>> the problem with irrelevant native UI is to not display it at all.
>> 
>> 2. That we need any native architecture for commands.
>> We don't. What a command is? It's a name, function and a state+value
>> refreshed on selection change. A command repository can be implemented
>> in JavaScript in few lines of code. CKEditor has one (and I guess that
>> all advanced editors have), because it is a necessary component on which
>> we must have full control. What it does, when it does, how a command is
>> executed, what arguments it accepts, which commands are available for
>> specific editor instance, etc.
> 
> FWIW I completely agree with Piotr. We need to be thinking about primitives that are as low-level as possible. We don't need to have any built-in support for things like bolding.

It's not a question of whether we need it or not. Browsers already DO have menu items to do it, and many users rely on that menu item working.

> If it somehow turns out that farther down the line there is a common set of commands that might somehow benefit from getting the native treatment we should cross that bridge then, but the v1 of this project should IMHO really, really not do more than what's needed for a script to cleanly implement an arbitrary text editor.

Things like undo, redo, paste, delete, select all, and "add link" in desktop Safari's edit menu, for example, need to work with whatever web app being developed.  It's not sufficient to provide UI within the web page.

- R. Niwa
Received on Friday, 6 June 2014 16:29:15 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 18:14:25 UTC