PPTX

链接

为形状和文本添加超链接以实现交互式导航

为形状或文本片段添加可点击的超链接,用于网页导航、邮件链接或幻灯片内部引用。

形状上的超链接

使整个形状可点击:

{
  "slides": [
    {
      "children": [
        {
          "shape": {
            "x": "1.3cm",
            "y": "1.3cm",
            "width": "10.6cm",
            "height": "2.6cm",
            "textBody": {
              "children": [
                {
                  "children": [
                    {
                      "text": "Visit our website",
                      "fill": "0563C1",
                      "underline": "SINGLE",
                      "hyperlink": { "url": "https://example.com", "tooltip": "Go to example.com" }
                    }
                  ]
                }
              ]
            }
          }
        }
      ]
    }
  ]
}

文本片段上的超链接

为特定文本部分应用超链接:

{
  "slides": [
    {
      "children": [
        {
          "shape": {
            "x": "1.3cm",
            "y": "1.3cm",
            "width": "15.9cm",
            "height": "7.9cm",
            "textBody": {
              "children": [
                {
                  "children": [
                    { "text": "For more info, visit " },
                    {
                      "text": "our documentation",
                      "fill": "0563C1",
                      "underline": "SINGLE",
                      "hyperlink": {
                        "url": "https://docs.example.com",
                        "tooltip": "Open documentation"
                      }
                    },
                    { "text": " for details." }
                  ]
                }
              ]
            }
          }
        }
      ]
    }
  ]
}

邮件链接

使用 mailto: URL 创建邮件超链接:

{
  "slides": [
    {
      "children": [
        {
          "shape": {
            "x": "1.3cm",
            "y": "1.3cm",
            "width": "10.6cm",
            "height": "2.6cm",
            "textBody": {
              "children": [
                {
                  "children": [
                    {
                      "text": "Contact Support",
                      "fill": "0563C1",
                      "underline": "SINGLE",
                      "hyperlink": {
                        "url": "mailto:support@example.com",
                        "tooltip": "Send email to support"
                      }
                    }
                  ]
                }
              ]
            }
          }
        }
      ]
    }
  ]
}

超链接选项

属性类型说明
urlstring外部 URL 或 mailto: 链接
slidenumber目标幻灯片索引(从 0 开始)
tooltipstring悬停时显示的提示文字

注意:使用 urlslide 其中之一,不要同时使用两者。

Copyright © 2026