add require text plugin, convert some html in JS to .html template files