Posting demo. Note: If you press escape a docx file will be generated. It is not perfect but it is a start.