4 ms·
I did quite a lot of hacking around the text selection when extending CKEditor for XML editing. In my opinion there are several reasons why text input and sele
by lykahb 7y ago
I did quite a lot of hacking around the text selection when extending CKEditor for XML editing.
In my opinion there are several reasons why text input and selection are so difficult:
1. The behavior is complex.
2. The behavior resists being formally defined. It differs across the user interfaces, such as URL bar, rich text editor, terminal, etc.
3. The requirements are evolving. The recent big change - the emojis - is still not universally supported.
4. The reasons above tend to add accidental complexity to the API that will only grow over time.
I feel like the best approach would be to create a mathematical theory describing the text input semantics. This approach worked quite well for other complicated areas in CS, such as concurrency or memory management.