- From: Johannes Wilm <notifications@github.com>
- Date: Fri, 29 May 2015 09:30:41 -0700
- To: w3c/editing <editing@noreply.github.com>
- Message-ID: <w3c/editing/issues/56/106864739@github.com>
@rniwa @kojiishi Could you agree on what to give us access to? I would prefer if the default behavior is platform/browser specific, but that beyond that the JS is free to do whatever it wants. Right now what we already kind of have access is the bounding box of a collapsed range (something like document.getSelection().getRangeAt(0).getClientRects()[0] ), to the degree that this can be relied upon. The JS then guestimates where the caret position in the line above would be, and tries out the bounding boxes of a few collapsed ranges and takes the closest match. So this can be done already, it's just rather cumbersome. Please keep that in mind when thinking of restricting JS editors: If you don't give them good access to what they really want, they will likely instead find a way around your restrictions, which likely will be somewhat slower due to the number of JS functions that have to be executed. @rniwa If you don't want to expose that, what would you be willing to expose? --- Reply to this email directly or view it on GitHub: https://github.com/w3c/editing/issues/56#issuecomment-106864739
Received on Friday, 29 May 2015 16:31:07 UTC