diff options
| author | Andreas Lubbe <git@lubbe.org> | 2015-01-23 18:24:23 +0100 |
|---|---|---|
| committer | Michael Williamson <mike@zwobble.org> | 2015-02-09 20:31:51 +0000 |
| commit | 4d4d9e669b389be294373cf3c9bd4727dd5f32af (patch) | |
| tree | d66a47574dfea6c24328aa296cb3b67f2d7890f2 /lib/documents.js | |
| parent | 37cdbc47dc105a3c745e0f718843e68cf1741aed (diff) | |
Add support for internal hyperlinks
Diffstat (limited to 'lib/documents.js')
| -rw-r--r-- | lib/documents.js | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/lib/documents.js b/lib/documents.js index 78bea1a..10d8646 100644 --- a/lib/documents.js +++ b/lib/documents.js @@ -13,7 +13,8 @@ var types = { table: "table", tableRow: "tableRow", tableCell: "tableCell", - lineBreak: "lineBreak" + lineBreak: "lineBreak", + bookmarkStart: "bookmarkStart" }; function Document(children, options) { @@ -74,7 +75,8 @@ function Hyperlink(children, options) { return { type: types.hyperlink, children: children, - href: options.href + href: options.href, + anchor: options.anchor }; } @@ -149,6 +151,13 @@ function LineBreak() { }; } +function BookmarkStart(options) { + return { + type: types.bookmarkStart, + name: options.name + }; +} + exports.Document = Document; exports.Paragraph = Paragraph; exports.Run = Run; @@ -163,5 +172,6 @@ exports.Table = Table; exports.TableRow = TableRow; exports.TableCell = TableCell; exports.LineBreak = LineBreak; +exports.BookmarkStart = BookmarkStart; exports.verticalAlignment = verticalAlignment; |
