Improved content edit js