Editing APIs - context


All methods like execCommand, queryCommandState are document's methods.
While it was reasonable when designMode was the only option and still is
acceptable in many case, I think that we could benefit from enabling the
same set of methods on DOM elements.

Example - In Firefox I can disable native objects resizing using the
disableObjectResizing command. But if I've got two inline editors on one
page I can't easily leave resizing enabled in one of them and disable in
the second one. I would need to execute this command every time focus is
moved from one editor to another.

This issue will become a bigger problem when we'll introduce new APIs to
enable/disable features and control commands' states. At this point we
should be able to limit effect of executed methods to one editing host. The
simplest solution seems to be making them executable on any element which
is an editing host.

Piotrek Koszuliński
CKEditor JavaScript Lead Developer

Received on Thursday, 10 July 2014 19:31:08 UTC