-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Automatic hyperlinks #1
Comments
I see two parts here:
A few leads: https://www.npmjs.com/package/get-urls https://github.com/commonform/commonform-docx/blob/master/templates/run.js#L47 |
Note to self, for later: <w:hyperlink r:id="rId7" w:history="1"><w:r w:rsidRPr="009B49CC"><w:rPr><w:rStyle w:val="Hyperlink"/></w:rPr><w:t>Link content</w:t></w:r></w:hyperlink> |
More links from Kyle: |
This looks promising: url-regex |
Cool, thanks. I may have some time over the weekend to put this together. |
Be warned: DOCX makes this kind of subtle. A nice first cut might be:
I personally wouldn't be too worried about links in headings, terms, or their combination with plain text. |
Right, makes sense. I'm looking forward to this because I put links in my |
This came up again, and I looked at it again. Basically, we can do the hyperlinks in the document easily enough. But we have to put the URLs they point do in a different XML file within the .docx ZIP archive. document.xml.rels needs something like this: <Relationship Id="example" Type="http://. . ./hyperlink" Target="http://www.example.com/" TargetMode="External"/> in order to do this in document.xml:
|
Sometimes I have URLs in my contracts. It would be nice if this package would detect them and create hyperlink objects in the output Word file.
I think the right approach is to keep written-out URLs in the text, and just wrap them with hyperlink markup.
Some possbily helpful info on how to accomplish this:
The text was updated successfully, but these errors were encountered: