fix bug with new doc, start working on publish view/embed dialog