generalised class editor in html