I use a form to input information to a program to display a webpage. One part of that form is a text-area into which one can type input, or simply paste a Word document.
This suggests to me that the idea is not to read a .docx file but that a user pastes content (with or without formatting?) into a webpage, which is backed by a Perl CGI script.
| [reply] [d/l] |
> that a user pastes content
Or he drags&drops a file, which is uploaded.
But yes I also expect copy and paste
> (with or without formatting?)
And that's exactly the point, in what way is a pasted text still "Word"? ¹
I've already seen ...
- plain text
- plain text with "markup"
- RTF
- HTML
- various abominations of the MS universe (OLE, etc)
... copied out of Word.
It also depends on the OS, the intermediate Clipboard, browser and attributes of the receiving textarea² used in the form.
The OP is keeping us guessing, instead of just showing us the exact text he gets inside his CGI.
¹) or to even quote the OP twice a "Word document"
²) "newer" browsers allow WYSIWYG editing
| [reply] |