factor out new-doc-text-area