-
Notifications
You must be signed in to change notification settings - Fork 666
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
hyperlink and tooltip property is not working? #758
Comments
Having a similar issue when trying to add multiple links inside table cells. I can add one link and it works fine like this: row.push({
text: "Link without Tooltip",
options: {
hyperlink: {
url: "https://www.google.com",
},
},
}); But if I try to add multiple links in a cell like so: row.push({
text: [
{
text: "Link without Tooltip",
options: { hyperlink: { url: "https://github.com/gitbrent" } },
},
{
text: "Link without Tooltip",
options: { hyperlink: { url: "https://github.com/gitbrent" } },
},
],
}); I get an error that says, I also noticed an error in the documentation that says the type of value to use for the hyperlink option is a string. |
Thanks @kuldeept70 The type defs were incorrect. Usage: slide.addText("Hyperlinks:", { x:0.5, y:6.0, w:'90%', h:0.3, margin:0.123, color:'0088CC' });
slide.addText(
[{ text: 'Link with Tooltip', options: { hyperlink: { url: 'https://github.com/gitbrent/pptxgenjs', tooltip: 'Visit Homepage' } } }],
{ x:0.5, y:6.4, w:3, h:0.6, margin:10, fill:'F1F1F1', fontSize:14, align:'center' }
);
slide.addText(
[{ text: 'Link without Tooltip', options: { hyperlink: { url: 'https://github.com/gitbrent' } } }],
{ x:5.0, y:6.4, w:3, h:0.6, margin:10, fill:'F1F1F1', fontSize:14, align:'center' }
);
slide.addText(
[{ text: 'Link to Slide #4', options: { hyperlink: { slide: '4' } } }],
{ x:9.5, y:6.4, w:3, h:0.6, margin:10, fill:'F1F1F1', fontSize:14, align:'center' }
); |
@CraigH2013 - the demo includes 2 hyperlinks on the same slide as your example shows and has no issues. The corruption may be caused by other objects. |
Hi @gitbrent , How I can get these changes? will these changes appear in next release or I can just upgrade my package to see the changes? |
@kuldeept70 - grab the newest |
Multiple on the same slide, yes. But I said in the same cell within a table. |
@CraigH2013 - Ah, got it. Please open a new issue and i'll look into it. |
I used this parameter { text: file.viewName + " ", options: { color: '3361FF', fontSize: 18, paraSpaceAfter: 18, hyperlink: { rId: 1, url: file.webUrl, tooltip: 'Visit File' } } } in slide.addText() ,but tooltip and hyperlink is not working.
The text was updated successfully, but these errors were encountered: