FIX bug javascript create / edit docs