[Webkit-unassigned] [Bug 25607] Need a way to catch (and cancel?) any execCommand. Maybe document.onexeccommand = ?
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Wed Jul 28 19:09:47 PDT 2010
https://bugs.webkit.org/show_bug.cgi?id=25607
Ryosuke Niwa <rniwa at webkit.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |rniwa at webkit.org,
| |slightlyoff at chromium.org
--- Comment #4 from Ryosuke Niwa <rniwa at webkit.org> 2010-07-28 19:09:46 PST ---
Alex proposed an alternative approach of exposing each command of execCommand as a method of document, window, etc... and make it replaceable by JavaScript, and have all editing commands such as bolding initiated by user go through that API.
So for example, you can override the bolding operation as follows:
var b = document.execCommand.bold;
document.execCommand.bold = function (range, showDefaultUI, value) {
if (...) {...}// take care of my stuff here
return b(range, showDefaultUI, value); // call the original for other cases
}
--
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
More information about the webkit-unassigned
mailing list