making editor in javascript from scratch because why not