draft function

Create a new document based on a template