html editor optimizations (fixed #79)