Skip to content
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

[Question] Is it possible to have a text hyperlink just in part of the text? #1326

Open
1 of 4 tasks
i23098 opened this issue May 1, 2024 · 0 comments
Open
1 of 4 tasks

Comments

@i23098
Copy link

i23098 commented May 1, 2024

Issue Category

  • Enhancement
  • Bug
  • Question
  • Documentation gap/issue

Product Versions

  • Please specify what version of the library you are using......: [3.12.0]
  • Please specify what version(s) of PowerPoint you are targeting: [ ]
  • Please specify what web browser you are using.................: [Chrome 124.0.6367.91]

Desired Behavior

I would like to have an email link in the middle of a sentence

Observed Behavior

Adding a hyperlink to the text makes the entire text a link

Steps to Reproduce

import PptxGenJS from 'pptxgenjs';

const pptx = new PptxGenJS();
pptx.layout = 'LAYOUT_4x3';

const slide = pptx.addSlide();
slide.addText("Contact [email protected] if you need help.", {
  x: 0.75, y: 4.25,
  w: 8.5, h: 0.35,
  fontSize: 14,
  hyperlink:{url:'mailto:[email protected]'}
});

pptx.writeFile({fileName: 'email-link.pptx'});

There should be a way (if there is, couldn't find it) to specify the hyperlink just on some word(s).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant