Modularized html editor code