Class Hyperlink

Hyperlink

A Hyperlink element used in TextFormatElement .

Only available for Google Workspace add-ons that extend Google Workspace Studio.

consthyperLink=AddOnsResponseService.newHyperlink()
.setText("Hyperlink_text")
.setLink("https://www.google.com");

Methods

MethodReturn typeBrief description
setLink(link) Hyperlink Sets the destination URL of the hyperlink.
setText(text) Hyperlink Sets the text of the hyperlink.

Detailed documentation

Sets the destination URL of the hyperlink.

Parameters

NameTypeDescription
linkStringThe destination URL of the hyperlink.

Return

Hyperlink — This hyperlink object, for chaining.


setText(text)

Sets the text of the hyperlink.

Parameters

NameTypeDescription
textStringThe text of the hyperlink.

Return

Hyperlink — This hyperlink object, for chaining.

Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2026年04月13日 UTC.