Re: [editing] Should the caret move by default, and should we define this behavior? (#58)

D is a clear answer. Now you wonder why one would want to use standardized caret behavior in the various examples you mention there.

As for the examples you mention:

1. Semantic Editor: Fidus Writer: only works in Webkit/Chrome. Actually it broke in Chrome a few Chrome versions ago, but I spent so much time fixing it in the past so it just didn't seem worth it continuing with that without fixing the problem at the root of this: that contenteditable isn't spec'ed in any way. I also tried getting it to work in Firefox, but I found out I would need to write all JS functions twice, so I gave up on that for now. I simplified it a little but by breaking it in certain cases (if two citations/footnotes go directly after oneanother, the caret can now no longer be placed in-between them). Most of the JS files here in soem degree try to fix CE behavior: https://github.com/fiduswriter/fiduswriter/tree/2.0/document/static/js

6. Track changes -- I contributed a lot to the NY Times's ICE editor to make it work not only with Firefox but also Chrome/Webkit: http://nytimes.github.io/ice/demo/ . You can find my contributions in the github history. Unfortunately it is somewhat broken now, as the original maintainer didn't have the time to update it every six weeks when a new Chrome version appears and new things break. It includes a test suite and all.  

I don't think any of those really can or should be done in contenteditable directly, even if it's 100% fixed. The amount of possible errors is just way too high. Instead it needs to be implemented as a datastructure  that is managed by some Javascript code that renders it in the DOM and records any changes made to it by the user as atomic commits which can then be stored, rolled back, shared with others in a collaborative environment, etc.. This is probably also true for other complex editors, especially when combining several complex sub components. 

---
Reply to this email directly or view it on GitHub:
https://github.com/w3c/editing/issues/58#issuecomment-108646945

Received on Wednesday, 3 June 2015 23:35:44 UTC