Writing the text editor has certainly been painful and taken me a long time. This particular feature (typing affinity) isn't actually to hard and I think could be bolted on to most existing edit editors. Really you just need to take one extra bit of state... and then can calculate cursor drawing + moment based on that state and all the other state the editor normally tracks.