Trim the editor JS logic.