convert ts.edit-article.coffee to js