Skip to content

Commit

Permalink
added demo for hyperlink (Issue #1049)
Browse files Browse the repository at this point in the history
  • Loading branch information
gitbrent committed Feb 26, 2022
1 parent 23a5e6e commit 22ab6b1
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions demos/react-demo/src/tstest/Test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -323,6 +323,16 @@ function testMethod_Table(pptx: pptxgen) {
},
]);
slide.addTable(arrRows, { x: 0.5, y: 0.6, w: 3, border: { color: "CFCFCF" }, autoPage: true, verbose: true });

// TEST: `hyperlink`
let arrTextObjects: pptxgen.TableRow[] = [
[
{ text: "Text Objects", options: { color: "99ABCC", align: "right" } },
{ text: "2nd cell", options: { color: "0000EE", align: "center" } },
{ text: "Hyperlink", options: { hyperlink: { url: "https://github.com/gitbrent/pptxgenjs" } } },
],
];
slide.addTable(arrTextObjects, { x: 0.5, y: 2.7, w: 12.25, fill: { color: "F1F1F1" }, border: { pt: 1, color: "696969" } });
}
}
/*
Expand Down

0 comments on commit 22ab6b1

Please sign in to comment.