making editor as index and using js version