UNPKG

pptx-automizer

Version:

A template based pptx generator

34 lines (33 loc) 1.3 kB
import { ShapeModificationCallback } from '../types/types'; /** * Helper class for modifying hyperlinks in PowerPoint elements */ export default class ModifyHyperlinkHelper { private static createRelationshipData; private static addRelationship; private static addHyperlinkToTextRuns; private static addHyperlinkToParagraph; private static createNewTextStructure; /** * Set the target URL of a hyperlink * * @param target The new target URL for the hyperlink * @param isExternal Whether the hyperlink is external (true) or internal (false) * @returns A callback function that modifies the hyperlink */ static setHyperlinkTarget: (target: string | number, isExternal?: boolean) => ShapeModificationCallback; /** * Add a hyperlink to an element * * @param target The target URL for external links, or slide number for internal links * @param isInternalLink * @returns A callback function that adds a hyperlink */ static addHyperlink: (target: string | number, isInternalLink?: boolean) => ShapeModificationCallback; /** * Remove hyperlinks from an element * * @returns A callback function that removes hyperlinks */ static removeHyperlink: () => ShapeModificationCallback; }