html text editor optimization