Improved text paste engine.